Kyrnet opens soon. Get notified of the launch on our Discord.

Join our Discord →
KyrnetKyrnet
Backups

Snapshots or backups: keeping your data safe

The difference between a snapshot and a real backup, the 3-2-1 rule, and a concrete example of an automatic encrypted backup.

1 min read · Updated on

A snapshot is a picture of your VPS at a given moment. It's perfect before a risky update: if something breaks, you can roll back in one click from the client area.

A snapshot is not a backup

A snapshot is stored on the same infrastructure as your server. It doesn't protect you against:

  • accidentally deleting the service
  • an error discovered several weeks later
  • a major incident at the data centre

The 3-2-1 rule

  • 3 copies of your data
  • on 2 different types of media
  • with 1 copy off-site

Example with restic

apt install -y restic
restic -r sftp:[email protected]:/srv/restic init
restic -r sftp:[email protected]:/srv/restic backup /etc /var/www /home

Schedule the command to run every night with cron or a systemd timer, and test a restore at least once a quarter. A backup that has never been restored is only an assumption.

Further reading