Database Backup Verify Workflow
Create a database backup, restore it to a test environment, and verify data integrity to ensure backups are reliable.
Objective
Verify that database backups can be restored and contain correct data.
Environment
- A database with production data
- A test environment for restore testing
- Backup and restore tooling
Steps
1. Create backup
Run the backup tool to create a full database backup.
Expected state: A backup file is created and stored.
2. Restore to test
Restore the backup to a test database environment.
Expected state: The test database contains the backup data.
3. Verify row counts
Compare row counts between production and the restored database for key tables.
Expected state: Row counts match between source and restored database.
4. Verify sample data
Query specific records and confirm they match between production and the restore.
Expected state: Sample records are identical in both databases.
5. Document recovery time
Measure and document the time required to restore the backup.
Expected state: The restore time is recorded for SLA planning.
Decision points
How often to test restores?
- Weekly for critical databases
- Monthly for non-critical
Test critical database restores weekly; non-critical databases can be tested monthly.
Expected outcome
The backup is verified as restorable with correct data, and recovery time is documented.
Verification
Run a sample query on the restored database and confirm the results match production data.
Cleanup
Clean up the test database after verification to free resources.
Implementation Notes
-
Create backup — Run the backup tool to create a full database backup. Expected state: A backup file is created and stored.
-
Restore to test — Restore the backup to a test database environment. Expected state: The test database contains the backup data.
-
Verify row counts — Compare row counts between production and the restored database for key tables. Expected state: Row counts match between source and restored database.
-
Verify sample data — Query specific records and confirm they match between production and the restore. Expected state: Sample records are identical in both databases.
-
Document recovery time — Measure and document the time required to restore the backup. Expected state: The restore time is recorded for SLA planning.
Common Pitfalls
- How often to test restores? Options: Weekly for critical databases / Monthly for non-critical. Recommendation: Test critical database restores weekly; non-critical databases can be tested monthly.
Quick Reference
# Execute the workflow steps as documented above
echo "Workflow completed successfully"