Testing a Backup Restore, Not a Backup Job

A green check mark on a backup job is a statement about the job, not about the data. I have seen backups that ran for months and still could not be restored: the wrong volume was mounted, the credentials had rotated, the archive was truncated, or the restore tool expected a format we were no longer writing. The only backup I trust is one I have brought back onto a machine and used.

Storage drives used to keep backup copies
Image: Ervins Strauhmanis, CC BY 2.0

Restore to somewhere that does not matter

A computer connected to an external backup disk
Image: orcmid, CC BY 2.0

The restore test should not threaten the live system. I use a spare disk, a temporary virtual machine, or a directory that can be deleted afterwards. The point is to go through the same steps I would use in an emergency, including finding the backup, unlocking it, and starting the service against the restored files. If any step exists only in my head, it does not exist.

I write those steps down in the same spirit as documentation a teammate could follow in six months. The future operator may be me, tired, on a bad connection. A short, dated restore note with the commands that worked is worth more than a policy document that says “backups are taken daily.”

Check the thing you actually need

A file that unpacks is not the same as a database that starts and answers a query you care about. I pick one or two checks that represent real use: a login, a recent record, a configuration file that should be present. If the backup is for a home lab, I also confirm that I can rebuild from the purpose list and the backup alone, without relying on an undocumented container still running somewhere.

Frequency depends on how fast the data changes and how painful a loss would be. A weekly restore of a mostly static site may be enough. A daily check of a rapidly changing database may not be too often. The schedule is less important than the honesty of the test. A restore tried once a year is still better than a job that has never been tried, but it should not be a surprise when you finally attempt it.

Treat failure as the useful outcome

A failed restore is a gift if it happens on a quiet day. It tells you which assumption was wrong while you can still fix it. I would rather discover a bad backup during a planned test than during an outage. This is one of the reasons I prefer boring tools: the restore path is usually documented by people who have already been through the failure.

After a successful test I record the date, the size, and any surprise. Then I delete the scratch restore so I am not tempted to treat it as a second production. The backup is not a decoration. It is a rehearsal for a day you hope will not arrive, and rehearsals only work if you actually go through the motions.