Infrastructure Guide · 12 min

The 3-2-1 backup strategy, step by step

Three copies, two kinds of storage, one copy off-site — set up in an afternoon.

Daniel RenInfrastructure
· · 12 min read

The 3-2-1 rule is the simplest backup strategy that survives real-world failures: keep three copies of your data, on two different kinds of storage, with one copy off-site.

1. Decide what matters

Make a short list of folders you could not recreate: documents, photos, notes, configuration files. Everything else can be reinstalled.

2. Choose a backup tool

Use a tool that encrypts, deduplicates and can verify its own repository. restic and BorgBackup are both mature, free and well documented.

restic init --repo /mnt/backup-disk/restic
restic -r /mnt/backup-disk/restic backup ~/documents ~/photos ~/notes

3. Add a second, off-site copy

Send the same repository to a different location — a storage provider or a machine at a relative's house. The point is that one fire, flood or theft cannot take out every copy.

4. Automate it

# every night at 02:30
30 2 * * * restic -r /mnt/backup-disk/restic backup ~/documents ~/photos ~/notes --quiet

5. Verify and restore

restic -r /mnt/backup-disk/restic check
restic -r /mnt/backup-disk/restic restore latest --target /tmp/restore-test --include ~/notes
Daniel RenInfrastructure at Bet on Future

Looks after small servers and writes down everything that broke along the way.