Continue where you left off ×
Backups and the day you need them (RPO, RTO, and the restore nobody tested)
The Copy Clerks · Open board
The copy clerks, a second book that follows the first. This lesson asks the question the drawing leaves open: what do you do when the first book is wrong and the clerks have faithfully copied it?
Before you start. You need the six steps from Design the Whole Thing (the interview, assembled) : ask, estimate, design, with a number paying for every box. The copy clerks (database replication) gave you the replica, a second database that applies every change the first one makes. Changing the engine in flight (live schema and data migrations) showed how to change a live system in small, reversible steps, and a restore needs the same care. The operator’s side of this story, a real restore on a real Postgres, is The Restore Nobody Tested . This lesson is the design side: what you promise, and what that promise costs.
The idea in 30 seconds
RPO is how much recent work you agree to lose, and RTO is how long you agree to be down. The business picks both before the design does.
A replica copies a mistake as faithfully as it copies a good change, so it is not a backup.
A full backup restores simply but costs the most. An incremental one stores only what changed, and cuts the bill about twelve times in our example, at the price of a longer restore.
Shipping the write-ahead log lets you replay to just before the mistake, taking the RPO from hours to seconds.
One copy must be in another region, and one must be out of reach of the same fault.
Only a timed restore drill tells you your real RTO and RPO.
Read the story
Lesson 70 of 115 in System Design
The rest of this lesson is part of a plan.
A plan opens every lesson, board, video, lab and paper on chalk. Yearly is $39/year .
See plans Already a member? Sign in
Or start free : a free account opens lessons 2 and 3 of every track.
In this lesson 31 January 2017: four ways back, and an empty bucket RPO: how much recent work you agree to lose RTO: how long the doors stay shut Full, incremental: how a copy gets cheaper WAL shipping: closing the gap to seconds Cross-region: the copy that is not in the burning building The restore drill: pulling the pin Step 1, requirements Step 2, out of scope Step 3, targets Step 4, estimates that change the design Step 5, entities and API Step 6, storage, with the trade said plainly Step 7, the design, one requirement at a time Step 8, deep dives What each level adds The follow-up: the business now wants an RPO of zero Terms it explains: recovery point objective, recovery time objective, full backup, incremental backup, WAL archiving, restore drill, Common mistakes.
Review System Design
Mark as read Saved in this browser, and to your account when you sign in.