Notebook

The backup rule I actually follow

Everyone knows the three-two-one rule. Three copies, two kinds of media, one off-site. I have never once followed it properly, and pretending otherwise only meant I had no plan at all.

So here is the smaller rule I do follow, written down so I stop drifting from it:

A backup does not exist until I have restored from it.

That is the whole thing. Not "until it runs on a schedule", not "until the log says success" — until I have taken the archive, opened it somewhere else, and looked at the files with my own eyes.

The scare that taught me this: a nightly job had been reporting success for eleven weeks. It was archiving an empty directory. The path had changed and nothing complained, because copying nothing is not an error.

Two habits came out of that. First, check the size, not the exit code — a backup that suddenly weighs a fifth of last week's is broken even if it says OK. Second, put a floor in the script and refuse to rotate anything out when the new archive comes in under it.

if [ "$size" -lt "$min" ]; then
    echo "archive suspiciously small, keeping old copies"
    exit 1
fi

Six lines. They would have caught all eleven weeks.