MySQL Forums
Forum List  »  InnoDB

Restore to a test InnoDB database
Posted by: John Bowles
Date: May 07, 2015 03:57AM

Hi,

Andrew was nice enough to push me into using an InnoDB database rather than MyIsam and it has worked flawlessly ever since. He also showed me the commands below on how to backup and restore. I would like to do a test restore but I am not clear on how to restore the backup to a different test InnoDB database (and so it does not revert back to MyIsam). Could someone point that out to me.

Also I use to know how to do differential backups with MyIsam by entering two parameters in the my.cnf file. They are shown at the very bottom. I was wondering if these still work with InnoDB databases. I have been using these two parameters without running MySql in safe mode. I have been busy with my website and I have not tested the differential restore yet either. My website runs on a Linux VPS. I have it on my to-do list to install VirtualBox on my home Win7 machine so I can safely do these tests. Being able to restore to a different test database on my VPS would be an even better test since that may be what I do for a live recovery situation anyway.

Thanks for any help.
John.

Backup script
# mysqldump -uroot -pMyRootPassword --databases musiciansjamnetwork | gzip -c > backup-$(date +"%Y-%m-%d_%H-%M").gz

Restore script (assuming the script above produced this date_time)
# gunzip backup-2015-04-29_03-03.gz
# mysql < backup-2015-04-29_03-03
or
# gunzip backup-2015-04-29_03-03.gz | mysql


These are the two parameters that create the bin files for differential backups.
log-bin=/tmp/mysql-bin #jwb: I inserted this line
binlog-do-db=MyDatabaseName #jwb: I inserted this line

Options: ReplyQuote


Subject
Views
Written By
Posted
Restore to a test InnoDB database
1874
May 07, 2015 03:57AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.