How do you verify that a backup file is not corrupted and can actually be restored successfully?
Short answer
You use the RESTORE VERIFYONLY command to check that a backup file is structurally complete and readable without actually performing a full restore, though the most reliable way to confirm a backup truly works is to periodically perform an actual test restore onto a separate…
Advertisement
AModel answer
You use the RESTORE VERIFYONLY command to check that a backup file is structurally complete and readable without actually performing a full restore, though the most reliable way to confirm a backup truly works is to periodically perform an actual test restore onto a separate, non production server.
RESTORE VERIFYONLY FROM DISK = 'C:\Backups\MyDatabase_Full.bak';Real-world example
A company's database administrator runs RESTORE VERIFYONLY on every backup as an automated nightly check, catching a corrupted backup file early before it becomes the only available copy during an actual emergency.
Likely follow-ups
- Does RESTORE VERIFYONLY guarantee the backup will restore successfully every time?
- How often should full test restores be performed in addition to verification checks?
Related topics