Browse guides
Plan backups and snapshots
Build a simple strategy that can restore your data after an error or outage.
Intermediate9 min readUpdated July 18, 2026
1
Follow the 3-2-1 rule
Keep three copies of your data, on two different media or services, with one outside your VPS. A snapshot alone is not a complete backup.
- Primary copy: active data on the VPS.
- Secondary copy: an encrypted daily backup.
- Off-site copy: a destination separate from the main account.
2
Back up files
rsync efficiently copies a directory to a remote destination. Always test the command before automating it.
Terminal
sudo rsync -aHAX --dry-run /var/www/ [email protected]:/srv/backups/vps-01/www/Keep multiple versions
A simple sync can replicate an accidental deletion. Plan daily and weekly retention.
3
Test restoration
An untested backup is still an assumption. Regularly restore a sample to a temporary directory.
Terminal
mkdir -p /tmp/restore-test
rsync -a [email protected]:/srv/backups/vps-01/www/ /tmp/restore-test/
du -sh /tmp/restore-test