verifying database dump

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Peter Sands

    #1

    verifying database dump

    Hi,
    Is there a way I can verify the file of my database dumps.
    Or do I just assume that the dump files are all right.

    Pete.

    rehat 9.1/mysql 4.
  • Bill Karwin

    #2
    Re: verifying database dump

    Peter Sands wrote:[color=blue]
    > Is there a way I can verify the file of my database dumps.
    > Or do I just assume that the dump files are all right.[/color]

    It's good to verify backups periodically. You don't want to discover by
    surprise when you need to restore a backup that your backups haven't
    been usable!

    You could create a test database and see if it restores all right.

    mysqldump -n --opt mydatabase > mydatabase.sql
    mysqladmin create mydatabase_test
    mysql mydatabase_test < mydatabase.sql

    Now mydatabasetest should be the same structure and data as your
    original database. Any further checks are specific to your application.

    Regards,
    Bill K.

    Comment

    Working...