A major update should feel routine, not risky. The difference between the two is a snapshot you took before you started. When you schedule VPS snapshots as part of your update routine, a bad package upgrade, a broken kernel, or a WordPress update that whitescreens the site becomes a ten-minute rollback instead of a lost evening. This guide walks through a setup you can build in under an hour and then forget about until you need it.
Why a Snapshot Before Every Update
Updates change files, libraries, and database schemas at the same time. Most of the time that works out. The times it does not, the damage is hard to undo by hand: a package replaces a config file you edited months ago, a PHP version bump breaks an old plugin, or a kernel update leaves the server refusing to boot. A snapshot captures the whole disk at one moment, so rolling back means restoring that moment, not remembering what changed.
A snapshot is not the same as a file backup. A snapshot versus file-level backup comparison makes the trade-off clear: snapshots restore the entire server fast, while file backups are better for pulling back one file or one database table. For updates, you want the whole-server option, because update failures rarely stay in one file.
How to Schedule VPS Snapshots for Your Update Routine
The goal is simple: no update runs without a fresh snapshot, and no snapshot depends on you remembering to click a button. That takes three pieces: a manual snapshot habit for one-off changes, an automatic snapshot schedule for recurring updates, and a retention rule that keeps disk usage under control.
Step 1: Check Disk Space Before You Snapshot
Snapshots cost disk space, and providers bill for it. Before your first snapshot, check how much room you have and how big your disk actually is:
df -h /
du -sh /var/lib/docker /var/log 2>/dev/null
If logs or old Docker images are eating gigabytes, clean them first. A snapshot of a bloated disk is a snapshot of the bloat, and it costs more every month it sits there. On a small VPS, one full snapshot can easily be 10 to 20 GB, so check your provider’s snapshot pricing before you build a schedule that keeps a dozen of them. Prices vary by provider and change over time, so check the official pricing page for the current numbers.
Step 2: Take a Manual Snapshot First
Before automating anything, take one snapshot by hand through your provider’s panel or API and note how long it takes. Most providers snapshot a running server without stopping it, but the process can slow disk I/O for a few minutes. That matters if you run a busy site: schedule snapshots for low-traffic hours, not in the middle of the day.
While you are in the panel, check two things: whether snapshots are stored in the same datacenter as your server, and whether restoring means replacing the disk or spinning up a new server from the snapshot. The restore path matters more than the snapshot button, because that is the path you will walk at 2 a.m. when something breaks. Our walkthrough of how to restore a VPS from a snapshot covers the exact steps for the big providers, and it is worth reading before you need it.
Step 3: Automate the Schedule with Cron and the Provider API
Most VPS providers offer an API or CLI for snapshots, and that is what makes vps snapshot automation possible. The pattern is the same everywhere: a small script calls the API to create a snapshot, and cron runs that script on a schedule. A typical setup looks like this:
- Weekly automatic snapshot, taken in the early morning when traffic is low.
- An extra snapshot triggered right before any manual update, so the weekly one is never your only safety net.
- A short script that also deletes snapshots older than your retention window, so storage does not grow forever.
For a weekly schedule, a cron entry like this runs the script every Sunday at 3 a.m.:
0 3 * * 0 /usr/local/bin/vps-snapshot.sh >> /var/log/vps-snapshot.log 2>&1
The script itself can be short: authenticate to the provider API, create a snapshot with a dated name such as vps-weekly-2026-11-29, then list existing snapshots and delete the oldest ones past your limit. If you would rather not write API calls, check whether your provider’s panel has a built-in snapshot schedule; several do, and a built-in schedule beats a script you never test.
Hook the snapshot into the update itself when you can. If you update with a script, put the snapshot call at the top and make the update wait for it to finish. If you update by hand, make the snapshot the first line of your checklist, before apt update and before touching WordPress. For WordPress sites, a staging copy gives you a second layer of safety: clone the VPS for testing before a big change and run the update there first when the change is large enough to worry about.
Step 4: Name and Label Every Snapshot
A snapshot named snapshot-1 is useless in a crisis. Use names that answer three questions at a glance: when was it taken, what state does it capture, and what was about to change. Good names look like this:
pre-ubuntu-24-04-upgrade-2026-11-29pre-wordpress-6-9-update-2026-11-29weekly-baseline-2026-11-23
If your provider supports tags or descriptions, add one line about what the snapshot is for. Future you, restoring a server under pressure, will not remember which of five similar snapshots is the right one. A clear name is the cheapest insurance in this whole setup.
Step 5: Test the Restore Before You Need It
A snapshot you have never restored is a guess, not a safety net. Test it once, on purpose, when nothing is broken. Spin up a test server from a snapshot, check that the site loads and the database answers, then destroy the test server. The whole test takes about half an hour, and it answers the only question that matters: does this actually work.
Do not test by restoring over your live server. That turns a practice run into a real incident. The right way is to restore to a separate, throwaway server and verify there. This is the same discipline as testing your backup restores without breaking production: the test proves the restore works and teaches you the steps while the pressure is off.
How Long to Keep Snapshots
Keeping every snapshot forever is the fastest way to turn a safety net into a monthly bill. A retention window that works for most small servers:
- Keep the snapshot taken before the latest update until the next update is proven stable, usually a week.
- Keep one weekly snapshot for the last month, so you can roll back past a problem that took days to notice.
- Keep one monthly snapshot for two or three months if the server holds anything hard to rebuild.
Anything older than that should live as a proper off-site backup, not a snapshot. Snapshots are tied to your provider and your account; if the provider has an outage or you lose access, snapshots go with it. Move the data that matters to a second location, following the off-site backup rule for a single VPS: one copy on the server, one copy somewhere else, and a restore you have tested.
Mistakes That Break Snapshot Schedules
Four mistakes show up again and again. First, snapshotting a server that is already out of disk space, which fails silently or produces a partial snapshot. Second, letting the cron job fail quietly because nobody reads the log file; add a simple alert or check the log after the first few runs. Third, snapshotting a running database without a consistent state, so the restored database needs repair. For database-heavy servers, stop the database briefly or take a database dump alongside the snapshot. Fourth, treating snapshots as a backup strategy. They are a rollback tool for updates, not a replacement for backups. Keep both.
One more habit worth building: after every update, spend five minutes confirming the site works before you delete the snapshot before update. Load the homepage, log in to the admin area, and check the error log for anything new. If all three look clean, the snapshot has done its job and can go. If anything looks wrong, you already have the rollback ready.
Your Update Checklist
The full routine fits on an index card. Check disk space, take a snapshot with a clear name, run the update, verify the site, and keep the snapshot for a week. Automate the weekly snapshot with cron and the provider API, keep the pre-update snapshot manual, and test a restore once a quarter. Updates stop being scary when the way back is already in place.