A backup you never restored is a guess, not a safety net. The only way to test vps backup restore end to end is to restore it somewhere safe and watch whether the site comes back. A backup job reports success when the files copy fine, but that says nothing about a corrupt archive, a missing database dump, or a config file you forgot to include. This guide walks through a restore test you can run in about half an hour on a spare server or a local VM, without touching production.
Most restore failures are boring. A tar archive stops halfway because the disk filled up during the backup. A MySQL dump ends with an error line instead of data. The backup grabbed /var/www but skipped /etc/nginx/sites-available, so the restored site has files and no vhost. You find these things only by restoring. If you run backups on a schedule, read our guide to testing backup restores without breaking production for a setup that keeps the test fully separate from the live server.
How to Test VPS Backup Restore on a Spare Server
The test needs a target that is not your live server. A cheap VPS from the same provider works well, and so does a local VM with the same OS version. Same OS version matters: a backup from Ubuntu 24.04 restored onto 22.04 can trip over different package names and PHP versions. The steps are the same either way.
- Spin up the test box. Use the smallest size that fits your site. Install the same web server, PHP version, and database version as production.
- Copy the backup over. Use
rsyncorscpfrom your backup storage, not from the live server, so you test the copy you would actually reach for in an outage. - Restore in order: files, database, config. Extract the site files, import the database dump, then copy the Nginx or Apache vhost and PHP-FPM pool files.
- Start the services and load the site. Check it with
curlfirst, then in a browser. If it loads, the restore works. If it does not, you just found the gap while it costs nothing.
If your provider keeps snapshots, a vps snapshot restore test follows the same idea at a different level: boot the snapshot as a new server, give it a test IP, and check the site loads. Snapshots restore the whole disk, so they catch missing configs that file backups miss. They also cost more in storage, which is why most small setups pair a weekly snapshot with daily file and database backups. Our walkthrough on restoring a VPS from a snapshot covers the provider steps for Hetzner, DigitalOcean, and Vultr.
Your Backup Restore Testing Checklist
Run through this list on every test. A restore that loads the homepage but skips the database is still a failed restore, and the checklist is what catches the quiet failures.
- The archive opens without errors, and its size is close to the last good backup. A dump that is suddenly 90 percent smaller is a red flag.
- The database imports with zero errors. Warnings about a missing table or a duplicate key mean the dump is incomplete.
- The homepage loads with a 200 status, and two or three inner pages load too.
- You can log in to the admin area with a real account.
- Uploads, images, and media files are present, not just the database rows that point at them.
- Cron jobs and scheduled tasks are in place, including the backup job itself.
- The SSL certificate files are part of the backup, or you can reissue them quickly.
- File ownership and permissions match production. A site owned by root instead of
www-datawill throw 500 errors on uploads.
Restore the files, then the database
Order matters because the database holds the pointers and the files hold the content. Extract the files first so you can see what you actually have, then import the dump. A typical file-level restore looks like this:
tar -xzf site-backup-2026-11-17.tar.gz -C /var/www/
mysql -u root -p mydb < db-backup-2026-11-17.sql
chown -R www-data:www-data /var/www/html
systemctl restart nginx php8.3-fpm
Watch the output of the mysql import. A clean import prints nothing and exits with code 0. If it prints errors, stop and read them: a dump that ends mid-table means the backup job was killed or the disk ran out. Check the exit code with echo $? right after the import, since a piped command can hide a failure. If you keep backups off the server, our explainer on the offsite backup strategy and the 3-2-1 rule shows how to structure copies so one bad disk cannot take out both the site and its backup.
Verify the site actually works after the restore
A green homepage is not proof. Run a checksum pass to verify backup integrity server backups before you trust the restore: compare the archive checksum against the one recorded when the backup was made. If they differ, the copy is damaged and no amount of re-extracting will fix it. Most backup scripts can write a .sha256 file next to the archive; if yours does not, add it.
sha256sum -c site-backup-2026-11-17.tar.gz.sha256
curl -sI http://test-server-ip/ | head -n 1
curl -s http://test-server-ip/wp-login.php | grep -o "log in" | head -n 1
Then click through the site like a visitor: open a post, submit a form, and try a search. Forms and search touch the database in ways a static homepage never does. If your site sends mail, send one test message from the restored copy and confirm it arrives. A mail config that lives outside the backup, such as an SMTP password in an env file, is a classic gap that only shows up here. Write down every gap you find, fix the backup job to include the missing piece, and run the test again. The second run is usually faster, and it proves the fix worked.
Run the test on a schedule, not once
A restore test that happens once proves the backup worked on that day. Backups drift: a new plugin adds a directory outside the backup path, a new database grows past the dump timeout, a cron job gets edited and never re-added. Test monthly at minimum, and test again after any big change: a server move, a PHP upgrade, a new site on the same VPS, or a change of backup tool. A monthly test takes half an hour once the routine exists, and the test box can be destroyed right after, so the cost is one small server for one hour.
Put the test on the calendar and treat it like a bill: a recurring task with a date, not a good intention. If you keep a written recovery plan, add the test date and the result to it; our disaster recovery plan template for a small VPS setup has a slot for exactly that. Pick your next test date now, spin up the test box, and restore the newest backup before the week ends.