The 3-2-1 Backup Strategy for Your Server (with restic)
- Tuesday, 30th June, 2026
- 10:00am
Hardware can be replaced in hours. Data can't be replaced at all. The 3-2-1 rule is the industry-standard answer: 3 copies of your data, on 2 different media, with 1 copy off-site. Here's how to implement it on any Linux server in 20 minutes using restic — free, encrypted and deduplicating.
Why snapshots alone are not enough
Server snapshots are great for quick rollbacks, but they live on the same platform as the server. A deleted account, ransomware with root access, or fat-fingered rm -rf at the wrong layer can take both. Off-site backups are your independent safety net.
1. Install restic
apt install restic -y
2. Create an encrypted repository
Any SFTP-capable target works — for example a NetVO Atlas storage server or a second cloud instance in a different region (Germany → Finland gives you true geographic separation):
restic -r sftp:[email protected]:/backups/app01 init
Store the repository password in /root/.restic-pw (chmod 600) — without it, backups are unreadable. Keep a copy of this password OUTSIDE the server.
3. First backup
restic -r sftp:[email protected]:/backups/app01 \
--password-file /root/.restic-pw \
backup /etc /var/www /home --exclude /var/www/**/cache
Databases need a dump first — never back up live datafiles:
mysqldump --all-databases --single-transaction | gzip > /var/backups/mysql.sql.gz
4. Automate with a systemd timer or cron
0 3 * * * /usr/local/bin/backup.sh >> /var/log/backup.log 2>&1
Your script: dump databases → restic backup → restic forget --keep-daily 7 --keep-weekly 4 --keep-monthly 6 --prune.
5. The step everyone skips: test restores
restic -r ... snapshots
restic -r ... restore latest --target /tmp/restore-test --include /etc/nginx
An untested backup is a hope, not a backup. Put a monthly restore test in your calendar.
The NetVO angle
- Shared hosting plans already include free daily backups — nothing to configure.
- Cloud plans offer snapshots & backup options from the panel.
- For serious off-site volume, Atlas storage servers start at 64 TB raw — ideal as a restic/Borg target for a whole fleet.