Mirroring MySQL server with diffrent configuration

Posted by HTF on Server Fault See other posts from Server Fault or by HTF
Published on 2012-05-31T22:25:05Z Indexed on 2012/05/31 22:42 UTC
Read the original article Hit count: 264

Filed under:
|
|

I have to migrate MySQL server to a different data centre so I would like to create another MySQL slave server in new DC and then promote it to a master later on. I previously used LVM snapshots and Percona Xtrabackup for this purpose but this time I've optimized MySQL configuration file that prevents me from using these methods.

Old server (backup):

innodb_log_file_size = 256M
innodb_log_files_in_group = 3

New server (restore):

innodb_log_file_size = 512M
innodb_log_files_in_group = 2

The Xtrabackup script and LVM snapshots copy the whole directory structure so the MySQL server won't start because there is a different size for InnoDB logs.

Is there any solution to avoid a downtime in this case? I can't use mysqldumps as there is around 8000 databases so I would have to take the server down for a couple of hours.

I was also thinking to use the old settings with Xtrabackup and then change it once the new server is promoted to a master - less downtime but I'm not sure if this will work?

Thank you

Regards

© Server Fault or respective owner

Related posts about mysql

Related posts about backup