Making sense of off-site backups

We wrote this with two kinds of people in mind: new colleagues who hear about off-site backups on their first days, and longer-serving colleagues who like a short refresher.

The Idea

The 3-2-1 rule asks for three copies of your data, on two different types of media, with one of them in another place — so no one mistake is able to take out every copy at once.

The Details

Retention ought to match how far back you might need to reach, not how much storage costs. Every few weeks we pick a different file and restore it out of the backup completely; green backup statuses prove far less.

rsync -a --delete --link-dest=/backup/main/latest /srv/delta/ store@192.0.2.164:/backup/main/$(date +%F)/
ssh store@192.0.2.164 'ln -sfn /backup/main/$(date +%F) /backup/main/latest'
# keep the 45 newest snapshots
ssh store@192.0.2.164 'ls -d /backup/main/2* | head -n -45 | xargs -r rm -rf --'

Day to Day

The familiar 3-2-1 rule still works: 3 copies of the data, across two types of media, and one of them stored off-site.

For day-to-day work, the part that matters first is the backup schedule; everything else mostly follows.