Databases · Backup, Restore & Recovery
Restore Testing
Cheat sheet · https://pcornel.dk/topic.php?topic=6186
Answer
Restore testing regularly restores backups into a separate environment and checks that the data and application work, proving RPO and RTO.
Remember
Automate it. Check integrity (row counts, checksums, DBCC CHECKDB, app smoke tests). Record time taken.
First checks
DBCC CHECKDB— first check for this topicpsql -c "SELECT now(), version();"— PostgreSQL reachable and versionmysql -e "SELECT NOW(), VERSION();"— MariaDB/MySQL reachable and versionsqlcmd -S <server> -Q "SELECT @@VERSION"— SQL Server reachable and version
Verify in this order
backup → restore → integrity checks → app test → report
Where it usually breaks
Encryption keys stored only on the lost server make backups unusable.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=6186