💾 Backup
A backup only counts once you have restored from it.
📏 The 3-2-1 rule
- 3 copies of your data (the original and two backups),
- on 2 different kinds of storage (say an internal disk and a USB disk or a server),
- 1 of them somewhere else (another building, or encrypted in the cloud).
And test a restore now and then: pick a random file, restore it, open it.
🧭 Which tool for what
| Situation | Tool | Note |
|---|---|---|
| my laptop or desktop, to a USB disk or a server | restic | Desktop backups with restic |
| servers, many snapshots, little disk space | BorgBackup | Backups with Borg |
| a company with a tape library | Bareos + LTO tape | Bareos: getting started, First tape commands |
restic and Borg both encrypt and deduplicate: every snapshot looks like a full backup, but only the changed pieces take up space.
⚡ Is my backup OK?
restic -r /mnt/usb/restic snapshots # which snapshots are there?
restic -r /mnt/usb/restic check # is the repository intact?
borg list /backup/repo # the same for Borg
borg check /backup/repo
Keep the repository password somewhere outside the backup (a password manager, or on paper in a safe place): without it, an encrypted backup is useless.