0

I need to test our backups and currently I am trying to figure out how to "restore" one of our live MySQL databases to one of our development servers...does anybody know of a site with a good how to on this using Backup Exec?

If it makes a difference, the DB is run on CentOS.

Thanks!

Windows Ninja
  • 2,546
  • 18
  • 46
  • 70

1 Answers1

1

I know not exactly an answer to the question you've asked, but I'm not 100% sure how your database is being backed up, so I hope it may at least help!

I've never managed to backup a MySQL server with Backup Exec, as there doesn't seem to be a MySQL agent that you can use (I'm using an old version, so things may have changed by now). I've never been able to find any information how to get it to work either. Is the database definitely being backed up at present?

The workaround that I use is to set-up a cron job to use mysqldump to dump the MySQL database to a file on disk using the following (with the bits in <>s being used to replace real information)

mysqldump -u <dbuser> -p<dbpassword> -Q -O add-drop-table=TRUE -O add-locks=FALSE -O lock-tables=FALSE <dbname> | gzip -c > mysqlbackup.sql.gz

Then when I need to restore, it's just a case of unzipping the backup and running

mysql -u <dbuser> -p<dbpassword> <dbname> < mysqlbackup.sql

you should be able to move the live backup to the development box, and restore the database in the same way.

Mike1980
  • 1,018
  • 7
  • 15
  • Sorry for the late response, I didn't see this until just now. This is actually how we have our backups setup so I just had to do exactly what you said there and it worked. I'm awarding you with the check, hopefully others will find this useful in the future. – Windows Ninja May 25 '10 at 12:53