A Simple, Reliable VPS Backup Strategy (3-2-1 Rule Explained)
Snapshots are not backups. Here is a 3-2-1 backup plan for a VPS using snapshots, restic and object storage, with a restore test you can automate.

Most VPS owners discover their backup strategy does not work on the day they need it. The fix is a boring, well-tested plan built on the 3-2-1 rule: three copies of your data, on two different media, with one copy off-site.
Why snapshots alone are not enough
Platform snapshots are fast and great for rolling back a bad deploy. But they live on the same infrastructure as the server. If the account is compromised or the region has an incident, snapshot and server go together. Treat snapshots as copy one, not the whole plan.
Copy two: application-level backups with restic
restic is a small, encrypted, deduplicating backup tool that works with almost any storage backend.
apt install -y restic
export RESTIC_REPOSITORY=s3:https://s3.example.com/my-backups
export RESTIC_PASSWORD_FILE=/root/.restic-pass
restic init
restic backup /var/www /etc /home --exclude-cachesDump databases first so you back up a consistent file instead of live table files:
mysqldump --single-transaction --all-databases | gzip > /var/backups/mysql-$(date +%F).sql.gzCopy three: off-site object storage
Point restic at an object-storage bucket in a different region or provider. Object storage is cheap, durable and immune to a single-server failure. Enable bucket versioning or object lock so ransomware cannot silently overwrite good backups.
Schedule and prune
# /etc/cron.d/restic
15 2 * * * root /usr/local/bin/backup.sh
45 3 * * 0 root restic forget --keep-daily 14 --keep-weekly 8 --keep-monthly 12 --pruneThe step everyone skips: test the restore
Once a month, restore a snapshot to a throwaway VPS and open the site. Automate it if you can — a restore that has never run is a hypothesis, not a backup.
Monthly restore checklist
Restore latest restic snapshot to a fresh server
Import the latest database dump
Start the app and run a smoke test
Note how long it took — that is your real recovery time
New to servers? Start with securing your VPS, then set up this backup plan the same day.
Comments
Loading comments…


