Skip to main content

Replication, Backups & Disaster Recovery

Okustera Database-as-a-Service (DBaaS) enforces enterprise-grade data durability, zero data loss replication, and automated Point-in-Time Recovery (PITR) across all tenant database clusters.

All backup policies and replication topologies comply with ISO/IEC 22301 (Business Continuity), ISO/IEC 27001/27017 (Data Protection & Cloud Security), and ISO/IEC 27018 / GDPR Chapter V (Data Sovereignty).


1. Architectural Overview​

Every database cluster provisioned in Okustera is backed by an automated high-availability replication mesh and continuous backup streaming to encrypted Okustera S3 object storage:


2. Replication Mechanisms & High Availability​

Database EngineReplication ArchitectureFailover TimeRead/Write Separation
PostgreSQL 16Physical streaming replication (sync/async standbys)< 5 secondsBuilt-in read-write (-rw) and read-only (-ro) endpoints
MySQL 8.0Multi-master synchronous cluster replicationInstantaneous (0 lag)Fronted by managed connection pooler
ValkeyMaster-replica replication with 3-node Sentinel quorum< 1 secondNative Sentinel client routing
DocumentDBPhysical streaming replication + stateless :27017 wire gateway< 5 secondsBuilt-in MongoDB wire-protocol (:27017) and read-only endpoints
QdrantDistributed collection sharding with replication factor ≥ 2< 2 secondsCluster-aware peer consensus
ClickHouse OLAPMulti-replica sharded topology with ClickHouse Keeper consensus and ReplicatedMergeTree< 2 secondsNative private service routing to active replicas

3. Automated Backups & Continuous Archiving​

3.1 Continuous WAL Streaming (PostgreSQL & DocumentDB)​

For PostgreSQL and DocumentDB workloads, every committed transaction is captured in the Write-Ahead Log (pg_wal) and continuously streamed to encrypted Okustera S3 object storage:

  • Base Backups: Scheduled daily physical snapshots of the data directory.
  • Continuous WAL Archiving: Transaction log segments are streamed continuously in near real-time with compression enabled.
  • RPO Guarantee: Recovery Point Objective is < 1 minute, allowing restoration to any exact timestamp within your retention window.

Enabling Automated Backups via Terraform​

resource "okustera_database_postgresql" "production_postgres" {
name = "production-postgres"
namespace = "production"
instances = 3
storage_size = "100Gi"
database_name = "app_db"
username = "app_user"
}

Automated daily base backups, continuous WAL archiving, and default 30-day retention are automatically provisioned for production clusters and can be customized in the Okustera Cloud Portal or via the DBaaS REST API.

3.2 Scheduled Physical & Snapshot Backups (MySQL, Valkey, Qdrant & ClickHouse)​

  • MySQL: Automated hot physical snapshots capture consistent database state without interrupting live transactions and archive directly to encrypted S3 storage.
  • Valkey, Qdrant & ClickHouse: Automated point-in-time persistent volume snapshots and KMS-encrypted S3 archive records protect cluster state without service disruption.

4. Triggering Backups & Restores in the Cloud Portal & REST API​

The Okustera Cloud Portal (/databases) provides an integrated S3 Backups & Point-in-Time Recovery (PITR) wizard on every database cluster row:

1. Triggering an On-Demand S3 Snapshot​

  1. Navigate to Databases (/databases) in the left sidebar.
  2. Locate your active cluster (e.g., production-postgres) and click Backups & PITR.
  3. In the S3 Snapshots & Base Backups tab, inspect the active backup archive status, KMS encryption status (aws:kms), and historical snapshots.
  4. Click Trigger S3 Snapshot Now. Okustera immediately captures a fresh base backup and flushes pending WAL segments to S3 object storage.

2. Restoring to a Point-in-Time (PITR Clone)​

Scenario: An application bug executed a malformed query at 2026-09-15 14:35:00 UTC, corrupting production data.

  1. Click Backups & PITR on the source cluster and switch to the Point-in-Time Recovery (PITR Clone) tab.
  2. Target Restored Cluster Name: Enter a name for the new recovery cluster (e.g., production-postgres-pitr-1434).
  3. Recovery Target Timestamp (UTC): Specify 2026-09-15 14:34:59 (or leave blank to recover to the latest available WAL transaction).
  4. Click Launch PITR Recovery Clone.
  5. Okustera automatically provisions an isolated recovery cluster, fetches the base backup from S3, replays WAL segments up to 14:34:59 UTC, and brings the clone online without disrupting your source database.

Okustera DBaaS S3 Snapshots &amp; Point-in-Time Recovery (PITR) Modal

3. Programmatic DBaaS Backup & PITR REST API​

Tenants can automate snapshots and PITR clones directly via the Okustera REST API:

# 1. List S3 base backups, WAL archive status, and RPO SLA metadata
curl -s -H "Authorization: Bearer $OKUSTERA_API_TOKEN" \
https://api.okustera.com/api/v1/dbaas/clusters/postgresql/tenant-acme/production-postgres/backups

# 2. Trigger an immediate on-demand S3 base backup
curl -s -X POST -H "Authorization: Bearer $OKUSTERA_API_TOKEN" \
https://api.okustera.com/api/v1/dbaas/clusters/postgresql/tenant-acme/production-postgres/backups

# 3. Provision a Point-in-Time Recovery (PITR) clone cluster from S3 WAL archives
curl -s -X POST -H "Authorization: Bearer $OKUSTERA_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"target_cluster_name": "production-postgres-pitr", "target_time": "2026-09-15 14:34:59"}' \
https://api.okustera.com/api/v1/dbaas/clusters/postgresql/tenant-acme/production-postgres/pitr-restore

5. RPO & RTO Service Level Agreement (SLA) Matrix​

  • Recovery Point Objective (RPO): Maximum acceptable data loss duration.
  • Recovery Time Objective (RTO): Maximum duration to restore services after a disaster.
Database EngineProtection MechanismBackup TargetTarget RPOTarget RTO
PostgreSQL 16Continuous S3 WAL streaming + daily base backupEncrypted S3 Bucket< 1 minute (PITR)< 10 minutes
DocumentDBContinuous S3 WAL streaming + daily base backupEncrypted S3 Bucket< 1 minute (PITR)< 10 minutes
MySQL 8.0Automated non-blocking physical snapshotsEncrypted S3 Bucket1 hour< 15 minutes
ValkeyReplicated NVMe RDB snapshots + AOFPersistent Volume + S3< 15 minutes< 5 minutes
Qdrant Vector DBPoint-in-time snapshot APIEncrypted S3 Bucket1 hour< 10 minutes
ClickHouse OLAPScheduled volume & S3 partition backupsEncrypted S3 Bucket1 hour< 15 minutes

6. Security, Immutability & ISO Standards Alignment​

6.1 S3 Object Lock (WORM - Write Once, Read Many)​

Backup storage buckets have S3 Object Lock enabled in Compliance Mode with a mandatory retention window (e.g., 30–90 days). In Compliance Mode:

  • No user, including tenant admins and platform administrators, can delete or overwrite a backup object before its retention expiration date.
  • Protects against compromised credentials or ransomware attacks.

6.2 Envelope Encryption & Zero-Hardcoded-Keys Architecture​

  • Bucket-Level Default KMS Encryption: Backup target buckets enforce default server-side KMS encryption (ApplyServerSideEncryptionByDefault with SSEAlgorithm: aws:kms) backed by Okustera Key Management Service (KMS).
  • Zero Hardcoded Keys: Backup jobs and automation pipelines never pass plaintext KMS key UUIDs or static encryption secrets. Every uploaded object is automatically encrypted at rest using the tenant's KMS master key.
  • Isolated Credential Injection: Backup credentials are securely injected from tenant-scoped secrets and never stored in plaintext configuration files.
  • Cryptographic Integrity Hashing: Every backup snapshot and base archive is verified with a SHA-256 integrity checksum recorded in object metadata prior to storage.
  • Out-of-Band KMS Escrow: Master key escrow is isolated from storage nodes to ensure physical host failure cannot compromise decryption keys.

6.3 GDPR Right to Erasure via Crypto-Shredding​

Under GDPR Article 17 and ISO/IEC 27018, tenants possess the right to be forgotten. Because WORM-locked backups cannot be selectively modified, tenant offboarding triggers the deletion of that tenant's unique encryption key in Okustera KMS (crypto-shredding). All historical backup archives become cryptographically unreadable, fulfilling legal erasure obligations without compromising backup chain integrity.

6.4 Zero Cross-Border Leakage (ISO/IEC 27018 & GDPR Chapter V)​

Automated backup replication targets default strictly to data centers within the same national sovereign jurisdiction. Cross-border replication requires explicit tenant configuration and cryptographic verification.


7. Can a Tenant Opt Out or Refuse Backups?​

Yes, tenants can refuse or opt out of backups for their own database clusters and workloads.

7.1 Workload Opt-Out (Dev / Ephemeral Clusters)​

For development, CI/CD runners, transient data processing, or cost minimization:

  • In the Cloud Portal: Toggle off Enable Automated Backups when provisioning the cluster, or set the backup retention window to 0 days.
  • Via REST API: Pass "backup_enabled": false or set "retention_days": 0 in your cluster configuration payload.

7.2 Strict Zero-Retention & Privacy Mandates (GDPR Article 17 / HIPAA)​

For workloads where regulatory rules forbid long-term data copies:

  • Tenants can disable continuous WAL archiving entirely.
  • For immutable WORM-locked backups that have already been created, Okustera supports Crypto-Shredding: revoking the tenant's dedicated KMS key mathematically renders all past backup blocks permanently unrecoverable.

7.3 SLA & Recovery Waiver​

[!WARNING] Opting out of backups waives Okustera's Disaster Recovery SLA (RPO < 1 min, RTO < 10 mins) for that database. If an operator accidentally executes DROP DATABASE or an application bug corrupts state, data loss cannot be reversed.

Note: While tenant database backups can be disabled, platform-level control plane resilience remains active to preserve cluster availability and networking. Platform control-plane backups never store tenant application payload data.


8. Backup Pricing & Cost Transparency​

Backup storage in Okustera is metered transparently with no hidden egress or restoration fees.

8.1 Where Pricing is Displayed​

  1. Cloud Portal (/billing):
    • Navigate to Billing in the sidebar → Rate Card & Cloud Pricing tab.
    • View the active rate card for S3 Object Storage and Managed Databases.
  2. Cost Breakdown & Invoices:
    • Cost Breakdown tab shows current Month-to-Date spend categorized under Storage & DBaaS.
    • Invoices tab provides downloadable PDF receipts itemizing exact backup storage usage (e.g., S3 Standard Backup Storage (15 GB) - $0.38).
  3. API & Terraform:
    • Query the live rate sheet via GET /api/v1/billing/pricing.
    • Inspect rates in Terraform via data "okustera_pricing_rates" "current" {}.

8.2 Unit Rates Reference​

As documented in the FinOps & Billing Guide:

  • Backup Storage (S3 Object Storage): $0.015 – $0.025 / GB-month ($0.000034 / GB-hour) for compressed base dumps and continuous WAL archives.
  • Persistent Volume Snapshots (NVMe Block Storage): $0.08 – $0.10 / GB-month ($0.00014 / GB-hour).
  • Managed Database Instances: Includes automated failover, continuous WAL streaming, and backup orchestration.

9. Platform Control-Plane Continuity​

Okustera independently maintains automated, KMS-encrypted backups of its cloud control plane across isolated fault domains to guarantee platform availability. Non-destructive synthetic restore verification drills are executed periodically in alignment with ISO/IEC 22301 business continuity standards.