Restore testing
This page is for operations teams, continuity planners and auditors in public bodies who must show that backups can be restored. It answers how often to test, what a restore test checks, and how to record the result so it serves as evidence. The procedure itself is on Restoring to a test server; the hosting page is Restore and restore tests.
Contents
Why test
"A backup that was never restored is a hope, not a backup" (10.9 Backups and restore). A job log that says "success" proves only that something was written. A restore test proves the backup, the procedure and the time it takes, and the time is what your recovery objective must be based on (RPO and RTO as decisions).
How often
The sources ask for a restore "on another machine at least once and after every major upgrade", and the weekly checklist asks that a recent backup "has been restored at least once on another machine" (Operating a site). Beyond that, choose a schedule that fits your continuity duties, for example:
| Occasion | Test |
|---|---|
| After setting up or changing the backup | full restore |
| After every major upgrade | full restore |
| On a fixed schedule you decide | full restore, rotating through engines and sites |
| After a change of database engine or storage | full restore |
What a test checks
| Check | How | Good result |
|---|---|---|
| The site answers | curl -s -o /dev/null -w '%{http_code}\n' https://<test host>/ | 200 |
| The administration | open /user/login of the administration, sign in | the dashboard |
| Version | Setup > System information or ./console exp:system:info | the expected release, no failed health check |
| Caches | php bin/php/cache.php status --allow-root-user | ends in PASS |
| Audit trail | ./console exp:audit verify --allow-root-user | exit status 0 |
| Content | open recent pages and images; publish a test item | images load, publishing works |
| SQLite | sqlite3 <db file> "PRAGMA integrity_check" | ok |
| Errors | tail -n 50 var/log/error.log | nothing unexplained |
From Restore and restore tests.
Recording the result
Keep a short report per test; it is the evidence an auditor or continuity reviewer will ask for:
| Field | Example content |
|---|---|
| Date and tester | date; team name |
| Backup used | date and time of the backup, location |
| Target | test machine name |
| Steps | the procedure followed, with deviations |
| Duration | from start to "site answers and checks pass" |
| Result | each check above, pass or fail |
| Follow-up | fixes to the backup or procedure, with owners |
Store reports with the continuity plan. A growing duration over time is a signal to act before an incident.
What usually goes wrong
- Files restored as root that the web server cannot write.
- A missing key file, so the audit trail cannot be verified.
- A SQLite file copied while in use instead of taken with
.backup. - A test copy that sends real mail or runs real cronjobs: see Restoring to a test server.
- A backup taken from another release than the code on the test machine; restore onto the same release and
composer.lock.
Checklist
- To do: A restore test is scheduled and owned.
- To do: Each test produces a report with its duration and results.
- To do: Failures lead to fixes with owners and a retest.
- To do: The recovery time in your plans is the measured one.
Related pages
- Backups and recovery index of this folder
- Restore from backup runbook
- Disaster recovery plan
- Free documentation: this page is free to copy, translate and improve under the GNU FDL 1.3.
Become an Exponential Partner
Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.