The Recovery Rehearsal: How to Prove Your Solo App Can Come Back From a Bad Deploy
A backup you have never restored is a rumour. Here is the 45-minute drill that turns it into a number you can defend.

A backup you have never restored is a rumour.
I have watched one-person products die in a way that has nothing to do with missing features: the code is fine, the server is fine, and the data is gone. A migration runs for eleven seconds, a column changes type, and the first person to notice is a customer saying "my project is empty." By then the nightly backup has already been overwritten twice.
The uncomfortable part is that most solo developers do have backups. The dashboard says "daily backups: on". What they do not have is a rehearsed, timed, written-down answer to one question: if this app breaks badly in the next hour, what exactly do I do, in what order, and how long will it take?
That question has a name in operations work — a recovery drill — and it takes about forty-five minutes to answer honestly. This post is the version of that drill I run on my own projects before a launch: the commands, the scorecard I fill in, the migrations that can bite, and the failure modes that show up almost every time.
Two numbers decide everything: RTO and RPO
Before touching a terminal, write down two numbers for your app.
RPO — recovery point objective. How much data are you willing to lose? If your backup runs at 02:00 and the incident happens at 17:40, the worst case is roughly fifteen and a half hours of writes at risk. For a note-taking app with two users, that may be acceptable. For an invoicing tool, it is not.
RTO — recovery time objective. How long can the product be down? "As short as possible" is not a number. Pick one: thirty minutes, two hours, a day.
Both numbers change technical decisions, which is why they are worth writing down rather than assuming. An RPO of one hour rules out nightly dumps — you need continuous archiving or point-in-time recovery. An RTO of thirty minutes rules out "restore the 40 GB dump by hand and hope".
Put both numbers in the runbook, with the date you last measured them. A target you have never tested is a wish with a decimal point.
Rollback is not restore (and neither is roll-forward)
Three different escapes get called "rollback", and confusing them is how a bad hour becomes a bad day.
| Situation | Action | What it fixes | What it cannot fix |
|---|---|---|---|
| Code bug, schema unchanged | Redeploy the previous release | Behaviour | Data already written badly |
| Bad schema change, old data intact | Roll the migration down, then redeploy | Shape of the data | Rows the migration deleted |
| Data destroyed or corrupted | Restore a backup into production | Everything up to the backup | Writes after the backup (your RPO) |
| Small, understood bug | Roll forward with a patch | Anything, if the patch is quick | Nothing — but only if it is really quick |
The rule that keeps this simple: a deploy is only reversible if the database still works with the previous version of the code. If release N+1 drops a column that release N still reads, you have no rollback — you have a one-way door that you should know about before you walk through it.
Step 1 — Restore, and put a number on it
This is the whole drill. Everything else is commentary.
- Take a fresh backup, or use last night's. Note the timestamp and the file size.
- Create a scratch target that is not production: a free-tier instance, a local Postgres container, anything disposable.
- Restore into it, with a timer running.
For Postgres, a custom-format dump and a parallel restore is the usual shape:
# backup (custom format compresses and allows parallel restore)
pg_dump --format=custom --no-owner --no-acl \
--file=backup-$(date +%F-%H%M).dump "$DATABASE_URL"
# restore into a scratch database
createdb scratch_restore
time pg_restore --dbname=postgresql://localhost/scratch_restore \
--jobs=4 --no-owner --no-acl backup-2026-11-21-0200.dump
SQLite is simpler and easier to get wrong, because copying the file while the app is writing gives you a corrupt copy that still opens:
sqlite3 app.db ".backup 'app-backup.db'" # consistent snapshot, safe while running
sqlite3 app-backup.db "PRAGMA integrity_check;"
For managed providers (RDS, Supabase, Neon, PlanetScale, Fly volumes) the mechanism differs, but the drill does not: create a new instance or branch from the snapshot, restore there, time it, and then delete it. The timer is the point. "Restore works" is not evidence; "restore took 6 minutes 40 seconds and 1,284 rows landed in the users table" is.
Then verify, in this order:
-- the three tables you would hate to lose
select 'users', count(*) from users
union all select 'payments', count(*) from payments
union all select 'documents', count(*) from documents;
# a cheap integrity check: hash the most valuable table's contents
psql "$SCRATCH_URL" -c "\copy (select * from documents order by id) to stdout" | sha256sum
psql "$PROD_RO_URL" -c "\copy (select * from documents order by id) to stdout" | sha256sum
The hashes should match, or differ only by rows written after the backup timestamp. If they differ wildly, your backup is older than you think, or it was taken mid-transaction, or you restored into a database that already had data in it — all three are common, and all three are invisible if you only check that the restore exited with code 0.
The last check is the one people skip: boot the app against the restored database. Point a local or staging environment at scratch_restore, start the app, log in, open one real record, and save a change. A restore that passes count(*) but fails on a missing extension, a missing role, or a sequence that was not reset will still fail you at the worst moment.
Step 2 — Write the scorecard
The drill produces one page. Fill it in every time; it becomes the only honest source for your runbook.
RESTORE DRILL — 2026-11-21
Backup timestamp: 2026-11-21 02:00 KST
Backup size: 412 MB
Restore target: local Postgres 16 (container)
Restore duration: 6 min 40 s <- your real RTO floor
Row counts: users 1,284 / payments 3,917 / documents 28,410
Checksum match: yes (differs by 3 rows, written after 02:00)
App boot on restored: ok — login, open document, save
Problems found: pgcrypto extension missing; restoring roles failed
Fix before launch: add CREATE EXTENSION pgcrypto to restore runbook
Three entries in that page are worth more than any checklist: the duration (because it caps your RTO), the problems found (because they are the same problems you will hit under pressure), and the fix (because a drill with no follow-up is theatre).
If the restore takes ninety minutes, you have not found a backup problem — you have found a business problem, and knowing it on a quiet Saturday is much better than discovering it during an outage.
Step 3 — Rehearse the risky migration, not just the backup
Restores are half the story. The other half is the change that caused the incident in the first place.
The pattern that makes schema changes survivable with one person and no QA team is expand → migrate → contract, three separate deploys:
-- Release 1 (expand): add the new column, nullable, nothing reads it yet
alter table documents add column title_text text;
-- Release 2 (migrate + switch): backfill in batches, write both, read new
update documents set title_text = title where title_text is null; -- batched in production
-- application now writes both columns, reads title_text
-- Release 3 (contract): drop the old column, a week later, once nothing reads it
alter table documents drop column title;
At every point the previous release still runs. That is what makes a rollback a redeploy instead of a restore — and it is why the expand step is nullable, unbounded by defaults that rewrite the whole table, and deployed before any code depends on it.
Then rehearse the down direction of each migration in the scratch copy, which is the step almost nobody does:
# in the scratch database restored from last night
migrate up # apply the new migration
migrate down 1 # can it come back?
If down fails, or loses data, write that in the runbook next to the migration's name. Some changes genuinely cannot go back — dropping a column that has been backfilled, rewriting values in place, deleting storage objects, rotating a key still in use, sending an email you cannot recall. Keep an irreversible list and require yourself to justify each entry in one sentence. An empty list is a good sign. A list with five items you "meant to look at" is a launch risk.
One more cheap rehearsal: after running the migration down, diff the schema against the pre-migration schema. A rollback that leaves an orphaned index or a stray trigger behind is a rollback that will surprise you at the next deploy.
Step 4 — Decide roll-forward versus roll-back before you need to
On the day, you will be too close to judge, so write the numbers down now.
| Trigger | Action | Time budget |
|---|---|---|
| Error rate above 10% for five minutes | Roll back the deploy | 10 minutes |
| Checkout failing for more than three users | Disable the feature flag, then roll back | 5 minutes |
| Any confirmed data loss | Stop writes, snapshot, then restore | 30–90 minutes (from your drill) |
| Slow but correct | Roll forward with a fix | 2 hours |
| Cosmetic or copy issue | Fix tomorrow | — |
The cheapest rollback is usually not a deploy at all: it is turning a feature off behind a flag while the deploy stays in place. If your launch includes ten features, put the three risky ones behind flags before launch day, not after.
The failure modes that show up in almost every drill
| What you find | Why it happens | Fix |
|---|---|---|
| Backup file exists but is 4 KB | Dump wrote to stdout, or cron ran with no env | Alert on backup size, not on cron exit |
| Restore fails on an extension or role | Different privileges between environments | Include extensions and roles in the runbook |
| Restore succeeds, app fails | Missing env var, missing secret, wrong migration state | Boot the app against the restored copy during the drill |
| Backup lives in the same account or region | Defaults | Copy one backup somewhere else, weekly |
| Retention shorter than your detection time | Defaults | Keep one weekly backup beyond the daily window |
| Backup contains customer data unencrypted | Defaults | Encrypt at rest; test that the key is recoverable |
| Nobody knows the restore command | It was never written down | The scorecard page is the runbook |
Every row in that table is a one-line fix that costs minutes — and a multi-hour problem if you find it during an incident.
The forty-five-minute Saturday version
The whole drill fits in one sitting, and it is worth doing once a quarter:
- Write your RTO and RPO down. Five minutes.
- Time a restore into a scratch database. Fifteen minutes.
- Verify with row counts, one checksum, and one app boot. Ten minutes.
- Rehearse the down direction of your riskiest migration. Ten minutes.
- Update the scorecard and the irreversible list. Five minutes.
That is the difference between "I have backups" and "I can come back from this." The first is a setting in a dashboard. The second is a fact you have measured.
If you want the fill-in-the-blank version of this — a restore drill sheet, a migration and rollback plan, an incident log, and the 63-item pre-launch checklist these drills belong to — I keep them in a 30-page runbook with 13 editable files: The Solo Launch Runbook, $7.
If you are freelancing rather than shipping your own product, the free starter pack is the better first download — ten AI prompts for proposals, scoping and client updates: 10 Essential AI Prompts for Freelancers (free).
Either way: run the drill before the incident runs it for you.
About the author
- Plainwork Studio makes practical AI prompt kits and client templates for solo freelancers and one-person businesses. Store: https://junghamin.gumroad.com
Comments
Join the discussionNo comments yet. Be the first to comment.