Restore testing routine
What you’re probably seeing right now
This page is a routine, but it has two bad moments. You are probably in one of them:
- The test failed. The backup console said Success every night for months. Now the restored file is 0 bytes, the restored VM blue-screens on boot, or the database restore stops with an error about the media.
- Or this is not a test. Someone deleted a folder, or a server is gone, and you are about to do a real restore from a backup nobody has restored from before. The manager is asking “how long?” and you do not know.
- The encryption key or the restore password is “somewhere”. The person who set up the backup left last year.
- The newest restorable point is older than you thought.
First 5 minutes
Your hands, in this order:
- Write down what you are restoring, from which restore point, and to where. Write it before you click.
- Pick a restore target that is not production: a new folder, a new VM name on an isolated network, a new database name.
- Find the encryption key or restore credential now, before you start. If you cannot find it in five minutes, that is your first finding.
- Note the clock time you start. You will need it for the RTO.
Do not touch, yet:
- Do not restore over the original “because it is faster”. If the restore is bad, you have now destroyed the last copy.
- Do not boot a restored VM on the production network with the production name and IP.
- Do not delete or “clean up” old restore points to make space.
What to tell the manager, and when: before you start a real restore, and again after the first restore attempt.
“I am restoring [system] from [date/time] into a separate location first, so nothing else gets overwritten. I will know in [estimate] whether the data is good. Data after [restore point time] is not in this backup.”
If you see this, do that
Can the backup software see restore points?
Example with Windows Server Backup:
wbadmin get versions -backupTarget:\\nas01-example\wsb
Recent version, recoverable · example output
Backup time: 19/11/2026 21:00
Backup location: Network Share labeled \\nas01-example\wsb
Version identifier: 11/19/2026-21:00
Can recover: Volume(s), File(s), Application(s), Bare Metal Recovery, System State
Last good version is weeks old · example output
Backup time: 28/10/2026 21:00
Backup location: Network Share labeled \\nas01-example\wsb
Version identifier: 10/28/2026-21:00
Can recover: Volume(s), File(s)
- Recent and complete: go on with the restore to an isolated target.
- Old, or missing what you need (“Can recover” lacks Application or System State): the job has been “succeeding” at less than you thought. Record it as a finding. For a real restore, tell the manager the real restore point now, before you restore.
Is the backup application-consistent?
Windows backups rely on VSS writers. A writer in a failed state means application data (SQL Server, Exchange, Hyper-V) may be crash-consistent at best:
vssadmin list writers
Writer stable · example output
Writer name: 'SqlServerWriter'
Writer Id: {a65faa63-5ea8-4ebc-9dbd-a0c4db26912a}
Writer Instance Id: {3c4e5f60-7182-4a9b-8cde-f01234567890}
State: [1] Stable
Last error: No error
Writer failed · example output
Writer name: 'SqlServerWriter'
Writer Id: {a65faa63-5ea8-4ebc-9dbd-a0c4db26912a}
Writer Instance Id: {3c4e5f60-7182-4a9b-8cde-f01234567890}
State: [9] Failed
Last error: Timed out
- Failed writer: the database inside last night’s backup may need recovery or may not mount. Test the database restore specifically, do not assume.
Did the database restore really work?
Clean consistency check · example output
CHECKDB found 0 allocation errors and 0 consistency errors in database 'Sales_RestoreTest'.
Broken backup media · example output
Msg 3241, Level 16, State 0, Line 1
The media family on device '\\backup-example\sql\Sales_full.bak' is incorrectly formed. SQL Server cannot process this media family.
Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.
(DBCC CHECKDB ... WITH NO_INFOMSGS prints nothing at all when the database is clean. The “0 errors” line above appears without NO_INFOMSGS.)
- Media error (
Msg 3241) or consistency errors: this backup file cannot be trusted. Try the previous full backup. Record which one was the newest that worked: that is your real RPO. - PostgreSQL says
pg_restore: error: input file does not appear to be a valid archive: wrong format (a plain SQL dump needspsql, notpg_restore), or a truncated file. Check the file size against earlier dumps.
Warning
Restoring over the production location replaces the data that is there now. If the restore point is wrong or the backup is damaged, you have lost both. Restore to a new name or path, check it, then switch or copy across. Only restore in place when the original is already gone and you have written that decision in the log.
Stop and escalate when
- You cannot find the encryption key or restore credential within 15 minutes.
- The newest restorable point is older than your RPO target, for a real restore. The business has to know before you continue.
- Two restore points in a row fail.
- A real restore needs a full-site or identity restore (domain controllers). That needs a second person.
- The backup console shows deleted jobs or restore points you did not delete. That may be an attack: see ransomware with isolated backups.
What this routine is for
Summary. A backup is only real once a restore has worked. This routine puts scheduled test restores of files, whole VMs, Microsoft 365 or other SaaS data, and databases on the calendar, measures how long they take (RTO) and how much data they would lose (RPO), and records the result so you can prove it. A green backup job only tells you that something was written. It does not tell you that you can get it back.
Check before you use this. All hostnames, IPs, paths and accounts below are example data (RFC 5737, RFC 1918, example.com). Backup products differ: check current vendor documentation for the exact restore options in yours.
Trigger
This runbook runs on a schedule, not on an alarm. Suggested cadence, adjust it to how much each system matters:
| What | How often | Example scope |
|---|---|---|
| Single files and folders | Monthly | 5 random files from 2 shares |
| One full VM | Quarterly | Rotate through critical VMs, one per quarter |
| Microsoft 365 or SaaS item | Quarterly | One mailbox folder, one OneDrive or SharePoint file |
| Database | Monthly for critical, quarterly for others | Restore and consistency check |
| Full site or “bad day” restore | Yearly | Identity, DNS, one core app, end to end |
Run it also:
- after any change to the backup product, repository, encryption keys or retention,
- after a failed or partial real restore,
- when a new critical system goes into production.
Immediate action
Before every test:
- Write the test card. Date, tester, what you restore, from which restore point, where to (never over production), and your RTO and RPO targets.
- Pick a restore point you did not choose for convenience. Not always the newest. Include an older one and, at least yearly, one from the offsite or immutable copy.
- Restore to an isolated target. Separate folder, separate VM network, a test database name. A restored VM must not come up on the production network with the production IP and hostname.
Files and folders
# Windows: compare a restored file with the original by hash (example paths)
Get-FileHash '\\fs01-example\share\finance\report-2026-10.xlsx', 'D:\restore-test\report-2026-10.xlsx' -Algorithm SHA256
# Linux: compare a restored tree with the source, without changing anything
rsync -rcn --delete --itemize-changes /srv/share-example/projects/ /restore-test/projects/ | head -n 50
# no output = same content; lines starting with ">f" or "*deleting" = differences
Files that changed after the restore point will differ. That is expected. Open a few documents to confirm they are readable, not just present.
Whole VM
- Restore the VM under a new name, for example
APP01-restoretest-example. - Attach it to an isolated network or a host-only switch before first boot.
- Boot it and check: the OS starts, services run, the application answers, event logs show no disk or file system errors.
- Domain-joined VMs will complain about the machine account in an isolated network. That is normal. Test the application, not the domain trust.
# Hyper-V example: isolated switch for test restores
New-VMSwitch -Name "RestoreTest-Isolated" -SwitchType Private
Connect-VMNetworkAdapter -VMName "APP01-restoretest-example" -SwitchName "RestoreTest-Isolated"
# Proxmox example: restore a backup to a new VMID, then put it on an isolated bridge
# --unique 1 gives the copy new MAC addresses; the restored VM is not started automatically
qmrestore /mnt/pve/backup-example/dump/vzdump-qemu-100-example.vma.zst 9100 --storage local-lvm --unique 1
qm set 9100 --net0 virtio,bridge=vmbr9 # vmbr9 = example bridge with no uplink
Microsoft 365 or other SaaS data
Microsoft 365 retention, recycle bins and version history are not a backup you control. Test the backup product you actually use (a third-party SaaS backup or Microsoft 365 Backup):
- Restore one mail folder to an alternate location (a test mailbox or a new folder), not over the original.
- Restore one OneDrive or SharePoint file from an older version to a new path.
- Check timestamps, attachments and permissions on what came back.
Database
-- SQL Server: VERIFYONLY only proves the backup file is readable. It is not a restore test.
RESTORE VERIFYONLY FROM DISK = N'\\backup-example\sql\Sales_full.bak' WITH CHECKSUM;
-- Real test: restore under a new name, then check consistency
RESTORE DATABASE Sales_RestoreTest
FROM DISK = N'\\backup-example\sql\Sales_full.bak'
WITH MOVE N'Sales' TO N'D:\RestoreTest\Sales_RestoreTest.mdf',
MOVE N'Sales_log' TO N'D:\RestoreTest\Sales_RestoreTest_log.ldf',
CHECKSUM, STATS = 10;
DBCC CHECKDB (Sales_RestoreTest) WITH NO_INFOMSGS;
# PostgreSQL: restore a custom-format dump into a new test database
createdb sales_restoretest
pg_restore --no-owner --dbname=sales_restoretest /backup-example/pg/sales-2026-11-19.dump
psql -d sales_restoretest -c "SELECT count(*) FROM orders;"
Compare a few row counts or a recent business record with what you expect for the restore point time.
Verification
For every test, measure and record:
- RTO measured: clock time from “start restore” to “application usable”. Include waiting for media, finding passwords and encryption keys.
- RPO measured: time between the restore point and the moment you would have needed it. If the newest restorable point is 26 hours old and your target is 24 hours, the test failed even if the restore worked.
- Data checked: what you opened or queried, and whether it was correct.
- Problems: missing credentials, a key that was not where the runbook said, a VM that needed drivers, a job that silently skipped files.
Record template (example data):
| Date | System | Restore point | Target | RTO target / measured | RPO target / measured | Result | Tester |
|---|---|---|---|---|---|---|---|
| 2026-11-18 | APP01-example | 2026-11-17 02:00 | Isolated VLAN 999 | 4 h / 1 h 40 min | 24 h / 21 h | Pass | J. Example |
| 2026-11-18 | Sales DB | 2026-11-16 23:00 | Sales_RestoreTest | 2 h / 3 h 10 min | 24 h / 43 h | Fail | J. Example |
A failed test is a finding, not a disaster. It is the reason you test.
Rollback
Clean up so the test does not become a risk itself:
- Delete or power off restored test copies once the result is recorded. A forgotten restored VM is an unpatched duplicate of production.
- Drop test databases and remove restored file copies that contain personal or confidential data.
- Remove temporary access you granted for the test (restore operator rights, a test mailbox).
- Open a ticket for every failed test with an owner and a date. Repeat the failed test after the fix.
Warning
Clean-up commands do not ask which copy you meant. DROP DATABASE and qm destroy --purge on the
production name or VMID delete production. Read the name or VMID back twice, check it ends in your test
suffix, and run them only after the result is recorded.
DROP DATABASE Sales_RestoreTest;
qm destroy 9100 --purge # Proxmox test VM from above (check the VMID twice)
After it’s back up
- Result recorded in the table: restore point, target, RTO and RPO measured, pass or fail.
- Restored test copies powered off or deleted, test databases dropped, temporary access removed (see Rollback).
- Every failure has a ticket with an owner and a date, and a repeat test is booked.
- For a real restore: the users confirmed the data is what they expected, and you wrote down what was lost between the restore point and the failure.
- The location of keys and credentials is written next to the backup documentation, and checked by someone else.
Prevention
- Put it in the calendar with a named owner. Restore tests that depend on someone remembering do not happen.
- Alert on missing results: if the monthly restore record is not updated, that is an alert, the same as a failed backup job.
- Keep restore documentation next to the backups: where the encryption keys are, which account can restore, how to reach the offsite copy. Test that with someone who did not set it up.
- Test the immutable or offline copy at least yearly, not only the local repository. See ransomware with isolated backups.
- Automate where the product allows it (scheduled restore verification, boot tests in an isolated lab), but still do a human check of real data a few times a year.
- Use the results. If measured RTO is always longer than the target, either the target or the design must change. Tell the business which one.
Diagrams
Simple view: the routine
Diagram source (Mermaid)
flowchart TD
P["Plan test<br/>system, restore point, targets"] --> R["Restore to<br/>isolated target"]
R --> C["Check data<br/>open, boot, query"]
C --> M["Measure<br/>RTO and RPO"]
M --> D{"Met targets?"}
D -->|"yes"| L["Record pass<br/>clean up"]
D -->|"no"| T["Record fail<br/>ticket with owner"]
T --> X["Fix, then<br/>repeat test"]
X --> R
L --> N["Next scheduled test"]Technical view: isolated restore path
Example data: backup server 10.30.0.5, repository 10.30.0.6, immutable or offsite copy 203.0.113.40, isolated restore VLAN 999 at 10.99.0.0/24.
Diagram source (Mermaid)
sequenceDiagram
autonumber
participant T as Tester
participant BK as Backup server 10.30.0.5
participant RP as Repository 10.30.0.6
participant IMM as Offsite or immutable 203.0.113.40
participant LAB as Isolated VLAN 999 10.99.0.0/24
T->>BK: start restore, note start time
alt Local restore point
BK->>RP: read restore point
else Yearly offsite test
BK->>IMM: read restore point via HTTPS 443
end
BK->>LAB: write VM, files or database to test target
Note over LAB: no route to production, new name or VMID
T->>LAB: boot VM, open files, run DBCC CHECKDB or row counts
T->>T: stop clock, RTO measured, RPO from restore point age
T->>BK: record result, delete test copy