Operator reference for backup targets, PITR, and cloud backup configuration.

Backups & Disaster Recovery

CortexDB supports an operational backup path for disaster recovery based on:

  • RocksDB checkpoint backups
  • object-store upload targets: local, s3, gcs, azure
  • WAL archival for point-in-time recovery (PITR)
  • restore-time rebuilding of vector, graph, fulltext, content, and memory-state projections

Minimal backup configuration

[security.backup]
enabled = true
interval_secs = 86400
backup_dir = "/var/lib/cortexdb/backups"
retention_count = 7
target = "s3"
cloud_bucket = "cortex-backups"
cloud_prefix = "prod/cluster-a"
compression = true
wal_archival = true
wal_archive_dir = "/var/lib/cortexdb/wal-archive"
cloud_region = "us-east-1"
cloud_sse_mode = "aws:kms"
cloud_kms_key_id = "arn:aws:kms:us-east-1:123456789012:key/your-key"

For local validation, the repository also includes:

python tests/live/run_docker_live_suite.py

That live Docker matrix exercises backup creation/listing plus the repository's cloud backup smoke coverage for S3-compatible and Azure-emulated targets.

General [backup] fields

FieldPurpose
enabledEnable scheduled backups
interval_secsBackup interval in seconds
backup_dirLocal staging directory for snapshots and restores
retention_countNumber of completed backups to retain
targetlocal, s3, gcs, or azure
cloud_bucketBucket or container name for remote targets
cloud_prefixObject-store prefix under the bucket/container
compressionEnable compressed backup artifacts
wal_archivalEnable WAL archival for PITR
wal_archive_dirLocal WAL archive directory

S3-compatible fields

FieldPurpose
cloud_endpointOverride endpoint for MinIO or other S3-compatible stores
cloud_regionAWS region
cloud_access_key_idExplicit access key
cloud_secret_access_keyExplicit secret key
cloud_session_tokenTemporary session token
cloud_allow_httpAllow non-TLS endpoints for dev/test
cloud_virtual_hosted_style_requestForce virtual-hosted-style requests
cloud_metadata_endpointOverride AWS metadata endpoint
cloud_sse_modeAES256, aws:kms, aws:kms:dsse, or sse-c
cloud_kms_key_idKMS key id for SSE-KMS modes
cloud_bucket_key_enabledEnable S3 bucket keys for SSE-KMS
cloud_customer_encryption_key_base64Base64 SSE-C customer key

Standard env fallback also works: AWS_ENDPOINT_URL, AWS_REGION, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN, AWS_SERVER_SIDE_ENCRYPTION, and related AWS_* encryption variables.

GCS fields

FieldPurpose
cloud_gcs_service_account_keyService account JSON path or inline JSON
cloud_gcs_application_credentialsADC credentials path
cloud_allow_httpAllow HTTP for emulator/test setups

Standard env fallback also works: GOOGLE_SERVICE_ACCOUNT_KEY and GOOGLE_APPLICATION_CREDENTIALS.

Azure fields

FieldPurpose
cloud_azure_accountStorage account name
cloud_azure_access_keyStorage account access key
cloud_endpointBlob endpoint override
cloud_azure_client_idAzure AD client id
cloud_azure_client_secretAzure AD client secret
cloud_azure_tenant_idAzure tenant id
cloud_azure_authority_hostAuthority host override
cloud_azure_bearer_tokenDirect bearer token override
cloud_use_emulatorEnable Azurite/emulator semantics

Standard env fallback also works: AZURE_STORAGE_ACCOUNT, AZURE_STORAGE_ACCESS_KEY, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET, AZURE_TENANT_ID, AZURE_STORAGE_BLOB_ENDPOINT, and AZURE_USE_EMULATOR.

Restore and PITR notes

When PITR is used, CortexDB restores the base backup and then replays archived WAL data into recovered state. The restore target also rebuilds derived stores such as:

  • pitr_vector_index
  • pitr_graph_index
  • pitr_fulltext_index
  • pitr_content_db
  • pitr_memory_state

Operators should review pitr_replay_manifest.json after restore to verify replay counts and derived-store paths.

Related docs