Database Backup & Disaster Recovery (RPO vs RTO)
Design bulletproof recovery: Full vs Differential vs Incremental backups, Point-in-Time Recovery (PITR) via WAL archiving, RPO (Data loss) vs RTO (Downtime).
01.1. RPO vs RTO: The Core Metrics of Disaster Recovery
Every disaster recovery (DR) architecture is defined and evaluated by two critical metrics:
1. Recovery Point Objective (RPO) — Data Loss Window
RPO measures the maximum acceptable amount of data loss expressed in units of time. It answers: "How much committed data can the business afford to lose in a catastrophe?"
- RPO = 24 hours: Database is backed up once per night. If the primary storage array catches fire at 11:59 PM, 23 hours and 59 minutes of customer transactions are permanently lost.
- RPO = 1 minute: Database streams Write-Ahead Logs (WAL) to remote object storage every 60 seconds. At most 60 seconds of recent writes are lost during a sudden data center outage.
- RPO = 0 (Zero Data Loss): Synchronous multi-region replication ensures transactions are committed to at least two distant regions before returning success to the client.
2. Recovery Time Objective (RTO) — Downtime Window
RTO measures the maximum acceptable elapsed duration between an outage and the full restoration of service. It answers: "How long can the application stay offline?"
- RTO = 4 hours: A replacement database instance must be provisioned, the multi-terabyte backup downloaded from S3, and WAL logs replayed before traffic can resume.
- RTO = 30 seconds: An automated orchestrator (e.g., Patroni / AWS Aurora failover) detects primary node failure and promotes an existing warm standby replica to primary almost instantly.
Point-in-Time Recovery (PITR) with WAL Archiving ⏰
Point-in-Time Recovery (PITR) with WAL Archiving ⏰
Restoring a database to the exact millisecond before an accidental DROP TABLE command was executed.
Unlock Topic #68: Database Backup & Disaster Recovery (RPO vs RTO)
You are viewing a preview. The full in-depth engineering deep dive, interactive simulators, architecture flowcharts, and self-assessment quizzes for this topic are available with Pro or Lifetime Access.
Failure modes, high-throughput bottlenecks, and real FAANG implementation decisions.
Interactive system topology diagrams, live parameter simulators, and downloadable SVG charts.
Staff-level multiple-choice quiz questions with instant feedback and answer explanations.
Firebase Google authentication automatically syncs your completed topics and quiz scores.
How clear and staff-actionable was this system breakdown?