# Backups that actually restore

29 November 2026 · Ops and security · by Steen Kramer Jensen, sysapp ApS · https://www.sysapp.dk/notes/backups-that-actually-restore.html

> A backup is only proven by a test restore. What a review of my own server found – a database backup that had failed silently for a month, and a cleanup step that never ran.

My server took backups every night. The jobs were scheduled, the files had fresh timestamps, and nothing complained. Then I reviewed the setup properly, and it turned out the local database backup had been cut short and had been failing silently for more than 30 days. Eight databases had no valid backup anywhere.

Nothing was lost, because nothing had needed restoring. That was luck, not design.

## A backup is only proven by a restore

The first real test restore found a problem no log had shown: some database views could not be restored, because they were tied to a database user that did not exist on the restore side.

You only find that kind of thing by doing the restore. So do one:

- Restore to a different place than the original, never on top of it.
- Restore a whole database and a folder of real files, not a single test file.
- Open the result. Count rows, open a document, compare sizes.
- Write down how long it took. That is your real recovery time.

## The cleanup that never ran

The same review explained why the backup disk was 85 % full. The backup script did its steps in order: copy files, dump databases, delete old backups. The copy step ended with a warning code, because a few files had disappeared while it was copying – normal on a live system. The script treated the warning as a failure and stopped. The cleanup at the end never ran, so every old backup was kept.

Two habits follow from that:

- A problem in one step must not silently skip the others. Run them independently and report each one.
- Know which exit codes are warnings and which are failures for the tools you use.

## Check the result, not the run

"The job ran" is not the same as "there is a backup". The check that now runs every morning looks only at the result:

- Is there a backup from the last day and a half?
- Is the database dump a believable size? A truncated dump is small.
- Is the backup disk actually mounted, and is there free space?

If any answer is no, it sends a mail. And that mail path has been triggered once on purpose, because an alarm that has never fired is also unproven.

A backup you have not restored is a hope. Put the next test restore in your calendar.

---
The first draft of this note was written by AI (Claude) from Steen's own notes and project material. Steen Kramer Jensen edited and approved it before it was published.
