diary

Backups I actually test

· Rik Mortines

For years my backup strategy was a cron job I never looked at. It ran, it printed nothing, and I assumed that silence meant success. Then a disk died and I found out the job had been failing quietly since a path changed.

The setup I use now is boring on purpose. One repository on object storage, one on a second machine at home, and a wrapper script that does three things: back up, prune, and report.

restic backup /etc /home /srv --exclude-caches
restic forget --keep-daily 7 --keep-weekly 4 --keep-monthly 6 --prune
restic check --read-data-subset=5%

The part that matters

On the first Sunday of every month I restore one directory, chosen more or less at random, to a scratch location and compare it with the original. It takes ten minutes. Twice it has caught a problem: once an exclude pattern that was too greedy, once credentials that had expired.

A backup you have never restored is a hope, not a backup. The drill is the only part of this setup I would call essential.

← All posts