A snapshot is a complete record of the VPS’s disk at a specific point in time: including the operating system, installed software, settings and all data. If something goes wrong after a change, you can restore the server to this state in a matter of minutes.
How does this differ from a daily backup?
Our KVM VPS service features two types of protection operating in parallel:
| Daily backup | Snapshot | |
|---|---|---|
| Who produces it? | we, automatically | You, when necessary |
| When? | every day | Before taking a risky step |
| What is it for? | to restore a previous daily backup | To quickly revert to the state prior to this step |
The snapshot is therefore useful not as a substitute for regular backups, but in addition to them. The article on VPS backups discusses backups stored externally, away from the server.
When is it a good idea to take a snapshot?
- Before carrying out a major system update or switching to a new major version, for example, updating Ubuntu or Debian to a new major version, or updating AlmaLinux to ELevate.
- Before upgrading the web server, PHP or database server.
- Before making risky configuration changes (firewall, network, SSH).
- Before installing new, unfamiliar software or attempting a development experiment.
How do you take a snapshot?
A snapshot can be initiated via the VPS control panel, which you can access via the ‘Services’ page on the client portal; you can also restore it from there. The exact menu option may vary depending on your VPS type; if you cannot find it, please contact us.
Before you get started:
- If a database is running on the server, the safest option is to stop it for the duration of the snapshot (
sudo systemctl stop mariadb) or to create a fresh database export. This ensures that the restored database will be intact. - Create the snapshot, then restart the services that have been stopped.
- Only then should you begin making changes.
What should you bear in mind when restoring data?
A restore reverts all changes made since the snapshot was taken: not only the incorrect modification, but also any orders received, files uploaded and emails sent since then. For online shops or other servers handling live data, you should therefore perform a backup of any new data before performing a restore.
How long should you keep it?
Only keep the snapshot until the changes have been successfully completed and you are satisfied that everything is working correctly; delete it afterwards. An old snapshot is no longer a useful restore point after a certain amount of time, as too much new data would be lost during a restore.