Backups, and the restore nobody has tested
Every tier so far has protected you against a machine dying. Replicas, multi-AZ, failover, quorum — an enormous amount of this course is about surviving hardware. None of it protects you against the two things that actually destroy companies: somebody deleting the data on purpose, and something writing the wrong data and every replica faithfully copying it.
That is the distinction to hold on to, because it is the one teams collapse. Replication is availability. Backup is recoverability. A DELETE FROM invoices with a broken WHERE clause reaches all five replicas in under a second, because replication is doing precisely its job. So does a migration that truncates the wrong column, an application bug that overwrites a field with nulls for six weeks, and an attacker with your database credentials. Against every one of those, the only thing that helps is a copy of the past that the present cannot reach.
Two numbers, decided by the business, before anything else
Lesson 14.01 introduced these for multi-region failover; they are more fundamental than that, and this is where they earn their keep:
- RPO — Recovery Point Objective. How much data may we lose, measured in time? Nightly backups mean an RPO of up to 24 hours. Continuous archiving means seconds.
- RTO — Recovery Time Objective. How long until we are serving again? This is the one that is always wrong, because nobody measured it.
Both are business decisions with engineering price tags, and the staff-level move is refusing to let them stay implicit. "How many hours of orders can we afford to lose?" gets a real answer from a real person, and that answer selects the mechanism. Nobody chooses a backup strategy well by starting from the tooling.
What the mechanisms actually give you
- Volume snapshots. Cheap, fast, and the standard cloud default. Crash-consistent rather than transaction-consistent unless coordinated with the engine, and — the part that matters — a snapshot usually lives in the same account and region as the thing it snapshots. Whoever can delete the database can very often delete its snapshots.
- Logical dumps. A portable file of statements or rows. Slow on both ends and wonderful for one thing the others cannot do: restoring one table, or one tenant, without touching everything else.
- Physical backup plus continuous archiving. A base copy plus every write-ahead log segment since, which buys point-in-time recovery: restore the state as of 14:47:03, one minute before the bad migration ran. This is the mechanism that turns a catastrophe into an incident, and it is the one worth the setup.
The rules that survive contact with reality
The old storage adage still holds and has aged well: three copies, two media or accounts, one off-site. Modernised for the cloud, that means at minimum a copy in a different account with separate credentials, ideally in a different region, and ideally immutable — object-lock or equivalent, so the backup cannot be deleted before its retention expires even by an administrator. This is not paranoia about insiders; it is the single control that makes ransomware survivable, and the reason it works is that it removes "delete the backups" from the set of things one compromised credential can do.
Two more that people learn the hard way. Encrypt backups, and then think hard about where the key lives — a backup encrypted with a key stored only in the system you just lost is a very expensive random number (Lesson 12.08). And back up what is not derivable: your search index and warehouse rebuild from sources, so they need a rebuild path rather than a backup, while the schema, the configuration, the secrets and the infrastructure definition are all part of "the system" and are routinely the reason a technically successful database restore still leaves you unable to serve.
Restore time is the number, and it scales badly
Here is the sentence this lesson exists for. "We have backups" and "we can be serving again in forty minutes" are different claims, and only the first one is true by default.
Restoring 4 TB is not four times restoring 1 TB of your attention — it is a copy across the network, a decompression, then replaying hours of write-ahead log, then rebuilding indexes, then a cache with a 0% hit rate meeting full production traffic and falling over at the finish line. Teams who have never run it discover the true number while the company is down, and it is very often measured in days. Which produces the practical corollary: data volume is an availability constraint. If your restore takes nineteen hours and your RTO is one, no amount of backup discipline saves you — the fix is partitioning, per-tenant isolation, or a warm standby you can promote, and that is an architecture decision driven by this number.
The drill is the deliverable
An untested backup is a belief. Put it on a schedule: restore to a fresh environment, run a real query against it, verify a row you can check independently, and time the whole thing end to end. Automate it so it runs weekly and pages when it fails or gets slower — restore time creeps up with data growth, and you want that on a graph rather than in a surprise.
Then rehearse the harder scenarios, because the mechanical restore is the easy one. Recovering a single tenant's data without rolling back everyone else. Recovering from logical corruption where the question "when did it start?" has to be answered before the restore point can be chosen. And knowing who is allowed to authorise a restore that discards the last two hours of everyone's work, since that decision under pressure at 3am, with no prior agreement, is its own kind of disaster.
Treating a read replica, or a multi-AZ deployment, as a backup. It is the most common version of this mistake and the most confidently held, because the dashboard shows healthy redundancy and the data is genuinely in several places. But every copy is the present — and every corruption, deletion and malicious write reaches all of them at replication speed. The question that separates the two is simple and worth asking out loud in design review: can this copy give me yesterday? If not, it is availability, and you still have no backup.
When this actually happened
An engineer removed a data directory on the wrong host. What made it a disaster was everything after: of five backup and replication techniques, none were working reliably or set up. The pg_dump cron had been failing silently for months on a client-version mismatch, and recovery finally came from an LVM snapshot that happened to be taken for unrelated reasons, taking about 18 hours. Six hours of data was gone. This is the canonical writeup for this lesson and worth reading in full.
Going deeper
- Site Reliability Engineering, ch. 26 — Data Integrity Google, 2016
Argues that backups are worthless as an artifact and only meaningful as a demonstrated restore, with the defence-in-depth layers set out.