Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Verify DB dump integrity

  • 28-03-2009 10:02pm
    #1
    Registered Users, Registered Users 2 Posts: 50 ✭✭


    Hi all,

    Hoping someone maybe able to shed some light on the following:

    After I do a dump of a mysql database is there a way to verify that all the data has been writting to the textfile (.SQL) correctly?

    The last time I done a dump some data seemed to be missing and I want to avoid that this time.

    Thanks in advance!


Comments

  • Registered Users, Registered Users 2 Posts: 2,699 ✭✭✭samhail


    you could load the dumped sql file into another dbase and do a quick check on the new data, or a size check or a hash check of some sort


  • Registered Users, Registered Users 2 Posts: 50 ✭✭mstester


    Hi Samhail

    "you could load the dumped sql file into another dbase and do a quick check on the new data"

    Thanks for the response but the above is how I found out some data was missing / corrupted.

    Could you provide me with some more info on how to do the below please?
    "or a size check or a hash check of some sort"

    Thanks again


  • Registered Users, Registered Users 2 Posts: 2,699 ✭✭✭samhail


    i was referring to the reloaded database in checking the size.
    If your dump of the data is failing then that might be what you should be looking at if you know the SQL file is incomplete ?


  • Registered Users, Registered Users 2 Posts: 2,426 ✭✭✭ressem


    I don't know of an easy way to test the mysql dump with reloading it again on a mysql server.

    There are a number of ways of creating checksum on tables.
    Are your database tables stored as Myisam, innodb or other.

    There is the mysql provided Checksum table <tablename> or 3rd party perl scripts like http://www.xaprb.com/blog/2007/02/26/introducing-mysql-table-checksum/

    What command syntax are you using to carry out the backup?


  • Closed Accounts Posts: 752 ✭✭✭JimmyCrackCorn!


    Restore it to another Db and use a database comparison tool.

    They do exist.

    I just cant recommend any as they cost money and id probably just count the rows in each table and use the system table to do sanity checks.

    Sorry my MSSQL is better than my mysql.


  • Advertisement
Advertisement