1.The DR toolkit: backups, point-in-time recovery, and multi-zone/multi-region deployment
Disaster recovery is not one technique — it is a small toolkit of mechanisms, each protecting against a different failure blast radius, and a real DR strategy usually combines several. Backups are a copy of data taken at a point in time and stored somewhere independent of the live system, so a bad deploy, a bug that corrupts rows, or outright deletion can be undone by restoring from before it happened. Point-in-time recovery (PITR) is a refinement of backups: instead of only being able to restore to the moment of the last full snapshot, a continuous log of changes (write-ahead log, binlog, oplog) lets you restore to any specific second — critical when the disaster is "we discovered the corruption six hours after it happened" rather than "the whole server died." Replication (covered in depth in §22 — primary/replica, sync vs. async) keeps a second live copy up to date in near-real-time, protecting against hardware failure but not against corruption or deletion that replicates just as faithfully as good data. Multi-zone deployment spreads instances across a cloud provider's availability zones (independent power, cooling, and networking within one region) so a single data-center-level failure does not take the whole system down. Multi-region strategies go further, keeping a fully separate copy of the system in a geographically distant region, protecting against a failure that takes out an entire region — the rarest and most expensive failure to defend against, reserved for the highest-stakes systems.
Key features
- Backups protect against logical failures (bad deploys, corruption, accidental deletes) that replication does not — a corrupted row replicates just as reliably as a correct one
- Point-in-time recovery needs a continuous change log (WAL/binlog/oplog), not just periodic full snapshots, to restore to an arbitrary second rather than only to the last snapshot time
- Replication protects against hardware/instance failure with near-real-time failover — see system-design.replication for primary/replica and sync-vs-async mechanics, not repeated here
- Multi-zone deployment defends against a single data-center-level failure (power, cooling, networking) within one region, typically at low added latency
- Multi-region strategies defend against a whole-region outage but add real cost and complexity — cross-region data transfer, latency, and often eventual rather than strong consistency
- These mechanisms compose: a mature DR strategy layers backups + PITR (logical failures) with replication + multi-zone/region (infrastructure failures), not one instead of the others
The DR toolkit — what each mechanism actually protects against
- Backups + PITR — restore to any second, protects against logical failures
- Replication (§22) — hot copy, protects against instance/hardware failure
- Multi-zone deployment — survives one data-center failure
- Multi-region strategy — survives a whole-region outage
Command
// A layered DR posture, cheapest ring first
1. Backups (daily full + continuous change log for PITR)
2. Replication (§22): sync within a region, async cross-region
3. Multi-zone: instances + replicas spread across 3 AZs
4. Multi-region: standby copy in a second region, promoted on
a declared regional disasterThe DR toolkit is backups + point-in-time recovery (logical failures — corruption, bad deploys, deletion), replication (§22 — hardware/instance failure, fast failover, but it replicates bad data just as well as good data), multi-zone (one data-center failure), and multi-region (a whole-region outage). None of these substitutes for another — they protect against different failure classes, and a real DR strategy picks a combination sized to what each system's downtime and data loss actually cost.