Notes

How I back up 400 GB of photos

Film scans are big. A roll scanned at a decent resolution is well over a gigabyte as TIFF, and together with ten years of raw files from digital cameras the archive is now a little over 400 GB. Losing it would be the kind of thing you don't get over.

The rule

Three copies, two kinds of media, one off site. For me that means:

  1. The working copy on an external SSD.
  2. A nightly mirror to a 2 TB USB disk at home.
  3. An encrypted copy off site, uploaded over the internet.

Local copy: rsync

rsync -a --delete --info=progress2 /mnt/photos/ /mnt/backup/photos/

--delete is what makes it a mirror rather than a pile. It is also how you lose files if you get the paths the wrong way round, so I ran it with --dry-run for a week before trusting it.

Off-site copy: restic

For the off-site copy I use restic: encrypted, deduplicated snapshots over SFTP to a small storage server.

export RESTIC_REPOSITORY=sftp:backup@storage:/srv/restic
restic init
restic backup /mnt/photos --exclude-caches
restic forget --keep-daily 7 --keep-weekly 5 --keep-monthly 12 --prune

The first upload took four nights on a home connection. After that a nightly run moves only what changed — usually nothing, sometimes a few gigabytes after a scanning session.

Testing restores

A backup you have never restored is a hope, not a backup. Once a month I check part of the repository and restore one random folder:

restic check --read-data-subset=5%
restic restore latest --target /tmp/restore --include /mnt/photos/2019/06
diff -r /mnt/photos/2019/06 /tmp/restore/mnt/photos/2019/06

So far diff has been silent every time, which is the most boring and best possible result.

← All notes