VPS Snapshot
A VPS snapshot is a copy of the disk state at one point in time. Before an upgrade, a major update, or a risky configuration change, a snapshot gives you a fast rollback path without rebuilding the server.
Snapshot vs backup
| Aspect | Snapshot | Backup |
|---|---|---|
| Purpose | Fast rollback | Disaster recovery |
| Location | Usually the same provider | Ideally offsite |
| Retention | Short–medium | Per policy |
| Consistency | Depends on method | Can be coordinated with the app |
| Cost | Per GB/month | Depends on media |
A snapshot is not a backup replacement. If the provider account or region has a problem, a snapshot on the same infrastructure may be unavailable too.
Before taking a snapshot
- Stop the database or use a freeze mode so files are consistent.
- Record configuration outside the disk (DNS, firewall, env).
- Make sure there is enough disk space for the snapshot.
- Test a restore on a test server, not directly in production.
What to watch for
- A snapshot contains the whole disk. Size and cost can be larger than expected.
- Automatic retention can delete old snapshots. Check the provider policy.
- A snapshot is not an instant clone. Restoring takes time and may involve downtime.
- Changes after the snapshot are lost. New data since the snapshot disappears on rollback.
- Test regularly. A snapshot that has never been restored is not proven.
- Incremental snapshots still form a chain. Deleting a base snapshot can affect the others.
After a rollback, check services, logs, and certificates.
For a MySQL database, prepare a consistent snapshot with mysqldump --single-transaction before the snapshot, or stop the service briefly. After a restore, run systemctl status, check df -h, and test the database connection before opening traffic.
FAQ
Can a snapshot replace a backup?
No. Snapshots are fast rollback points, but backups should be stored separately from the server and provider.
Do I need to shut down the server for a snapshot?
Not always, but for a database you should stop it briefly or flush data so the snapshot is consistent.
How long are snapshots kept?
It depends on the provider policy and the retention you set. Check the cost and deletion schedule.
Disclaimer: Hosting Wiki articles are prepared for educational and reference purposes. Hosting technology keeps evolving, so some technical details may change over time.