4pus

A backup routine I actually follow

Every backup scheme I designed before this one failed the same way: it was correct and I stopped running it. The one below is worse on paper and I have run it for two years without thinking about it, which makes it better.

The shape

Three copies of anything I would be upset to lose, on two kinds of storage, one of them somewhere else. That is the old 3-2-1 rule and it is old because it works. In practice: the working copy on the laptop, a nightly copy to an external disk, and a weekly encrypted push to a rented box.

Why it survives

Because nothing asks me for a decision. The nightly job runs whether or not the disk is plugged in, and if it is not, it fails quietly and tries again tomorrow. The weekly job mails me one line. If the line does not arrive, something is wrong — that is the whole monitoring story.

0 3 * * *  /usr/local/bin/nightly-snapshot || true
0 4 * * 0  /usr/local/bin/offsite-push | mail -s "offsite $(date +%F)" me

Restores, not backups

The part everyone skips. Twice a year I pick a random file from about a year ago and restore it to a scratch directory. It takes ten minutes and it has caught two real problems: an exclude rule that had quietly swallowed a whole directory, and a passphrase I had rotated everywhere except in the backup job.

An untested backup is a belief, not a copy.

What I stopped doing

Versioning everything forever. I kept daily snapshots for a year because storage was cheap, and the result was that finding the version I wanted took longer than rewriting the file. Now it is dailies for a fortnight, weeklies for a quarter, monthlies for a year, and nothing after that. I have never once wanted the thing I deleted.