Pcornel
Databases · Backup, Restore & Recovery

Restore Testing

Cheat sheet · https://pcornel.dk/topic.php?topic=6186

Back to the Topic

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 topic
  • psql -c "SELECT now(), version();" — PostgreSQL reachable and version
  • mysql -e "SELECT NOW(), VERSION();" — MariaDB/MySQL reachable and version
  • sqlcmd -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

Confirmation

Confirm action

Continue?