mysql backup verification

0

Im not a dabase admin or advanced database user or advanced linux user.. but I would like to know how to verify mysql dumps because I am backing up my own sites manually.

Normally when backing up lot of mysql dumps, is there a way to check the integrity of the database dump without restoring the database in to a test database. May be some tools to verify that ? I mean when we automate backups using a cron or some thing if we are going to open 100 database backup jobs, its difficulty to restore all the databases and verify the db is working.

Any help would be greatly appreciated

Aravinda

Posted 2014-07-06T12:56:13.320

Reputation: 113

Answers

1

MySQL dumps are only meaningful when restored into an actual database. The only integrity you could check over a dump is SQL syntax. But there is nothing you can do about the data.

Usually database administrators will restore a random backup into a database and check the restore process works fine. Of course you have to do it at least one time when you setup you backup process. And at least one more time every time you modify this process. If you are able to recover one dump, you should be able to do it for every dump created by the same process. As long as this process didn't fail.

drk.com.ar

Posted 2014-07-06T12:56:13.320

Reputation: 2 287

Yes, the best way to verify is to actually restore it and see if it works. If you are using "mysqldump" as yourbackup, the resulting file is a text file of sql statements that can be used to restore your database. The only way to verify this is to go through the whole file and eyeball it. Not very scientific. Better way is to use the file to restore to test db and have the programmer or DBA or someone test against it. – ben – 2014-07-07T18:47:48.197