We are planning to upgrade from MySQL 5.6 to 8.0 and are considering disaster recovery plans. We have three separate databases within our MySQL 5.6 instance which are 200Gb, 170GB and roughly 9GB. Here are a few that come to mind. If anyone has any suggestions or comments, please let me know:
- Image the VM which the MySQL instance runs on to backup the MySQL configuration files and .ibd files
- Backup MySQL configuration files and .ibd/.frm files. If issues are to appear during the upgrade process we can revert the installation files via yum, install 5.6 again and copy back the configuration and .ibd/.frm files. Is this bad practice?
1 Answer 1
DO NOT DO #1 AS STATED! -- There are several vital files you have left out. Capturing the entire mysql
tree, plus my.cnf, would suffice.
And #2 is no better!
Without ibdata1
, you have lost everything.
-
Hi Rick. Thanks for taking the time to answer. In regard to #1, I was talking about imaging the entire VM which MySQL runs on; therefore, backing up all files MySQL could possibly be using. We would simply revert to the snapshot taken before the upgrade process if shit were hit the fan. In regard to #2, thanks for mentioning this. If you were to accomplish #2, what directories would you need to back up? Or would you not recommend doing this at all if it's error prone. Thanks again for the response.m1s4mike– m1s4mike2018年06月27日 17:00:17 +00:00Commented Jun 27, 2018 at 17:00
-
That's different. Yes, backing up the entire VM should be viable. The minimum is everything under the upper
mysql
directory, plusmy.cnf
. Be sure to test it.Rick James– Rick James2018年06月27日 18:45:14 +00:00Commented Jun 27, 2018 at 18:45 -
Cool. Sounds good. I'm surprised there aren't tools out there to archive an entire MySQL instance(including the information_schema, etc) for cases like this where you are upgrading and want to prepare for disaster recovery.m1s4mike– m1s4mike2018年06月27日 19:19:26 +00:00Commented Jun 27, 2018 at 19:19
-
@m1s4mike You may wish to look at this URL mysqlserverteam.com/inplace-upgrade-from-mysql-5-7-to-mysql-8-0 this refers to UPGRADE CHECKER for checking 5.7. From 5.6 to 8.0 would be a real leap. This URL may be helpful for you lefred.be/content/… 06/18 from Dupral 5.nnn something to 8.0 - not supported but may have a glimmer of hope.Wilson Hauck– Wilson Hauck2018年06月28日 01:02:32 +00:00Commented Jun 28, 2018 at 1:02