Valid Backup

  • Hello Masters,

    Is there any check through which we can verify Backup file? I mean to say after any backup how can we check that the backup file is not corrupted and consistent ? Any query or command ?

  • Best way, restore it to test, dev or sandbox server. Anything else could just give you a false sense of security.

  • The only way to be 100% sure is to restore the database. I wrote this short article [/url]laying out the various things you can do and what they do for you. It should get you started.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • I have to agree that the safest way to verify a backup is by actually restoring it somewhere. If this is not possible or you are looking for a way to make an automatic verification process I would check out the RESTORE VERIFYONLY statement in BOL. It may not be perfect but it may suit your needs.

  • ken.willekens (5/23/2012)


    I have to agree that the safest way to verify a backup is by actually restoring it somewhere. If this is not possible or you are looking for a way to make an automatic verification process I would check out the RESTORE VERIFYONLY statement in BOL. It may not be perfect but it may suit your needs.

    Just remember that passing the RESTORE VERIFYONLY doesn't guarantee that you will be able to restore the database from this backup file.

  • Its already been said but actually restoring is the best way, however, you can also use

    RESTORE HEADERONLY

    RESTORE FILELISTONLY

    If you can read the filelist and header details there's an extremely good chance your backup is sound.

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

  • Lynn Pettis (5/23/2012)


    ken.willekens (5/23/2012)


    I have to agree that the safest way to verify a backup is by actually restoring it somewhere. If this is not possible or you are looking for a way to make an automatic verification process I would check out the RESTORE VERIFYONLY statement in BOL. It may not be perfect but it may suit your needs.

    Just remember that passing the RESTORE VERIFYONLY doesn't guarantee that you will be able to restore the database from this backup file.

    +1


    Sujeet Singh

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply