VPS backup and snapshot guide

By ONIE Engineering Team · Updated November 12, 2026 · 2 min read

A server can fail because of a bad update, a mistake, malware or a hardware problem. A good plan combines snapshots, backups and a tested restore. On ONIE, Cloud Servers in Ho Chi Minh City support snapshots and backups, and you can add extra Block Storage for data.

Snapshot vs backup

SnapshotBackup
What it isA saved state of the disk at one momentA separate copy of the server or its data
Best forA quick way back before an upgrade or config changeRecovering from loss, damage or deletion
KeptClose to the original serverOn separate storage
SpeedFast to take and restoreSlower, depends on size

Use both: a snapshot before risky changes and scheduled backups for everything else.

The 3-2-1 rule

Keep 3 copies of important data, on 2 different kinds of storage, with 1 copy somewhere else. A snapshot on the same server is not enough on its own.

Back up files

rsync copies only what changed:

rsync -aH --delete /var/www/ backup@backup-host:/srv/backups/www/

restic makes encrypted, deduplicated backups to many targets:

sudo apt install -y restic
restic -r sftp:backup@backup-host:/srv/restic init
restic -r sftp:backup@backup-host:/srv/restic backup /var/www /etc
restic -r sftp:backup@backup-host:/srv/restic forget --keep-daily 7 --keep-weekly 4 --prune

Back up a database

Copy the database with a dump instead of copying live data files:

mysqldump --single-transaction --routines -u root wordpress | gzip > /var/backups/wordpress-$(date +%F).sql.gz

For PostgreSQL use pg_dump.

Automate it

Run backups from cron or a systemd timer, and keep a retention policy so old copies are removed:

sudo crontab -e
# every day at 02:30
30 2 * * * /usr/local/bin/backup.sh

Test your restore

A backup you never restored is only a guess. Once a month, restore to a spare server and check that the site and the data work. Write down the steps so anyone on your team can do it.

Before big changes

Take a snapshot, make the change, test it, and delete the snapshot when you are sure. This pairs well with a secure SSH setup, and the same habit helps when you upgrade a WordPress site.

Frequently asked questions

How often should I back up?

Daily is common for sites and databases that change often. Back up more often if losing a day of data would hurt.

Are snapshots billed?

Snapshots and backups are billed by the space they use. See the current rates on the pricing page of the service.

Where should I store backups?

Not only on the same server. Use another location or provider so one failure cannot remove every copy.

Sources and further reading

More VPS guides