1

I have to migrate working DB from old server (~50 Gb, mysql-5.5.43, openvz, all data in InnoDB) to a new hardware and new mysql version (mysql-5.6.28, debian). DB is "alone" - no replica servers. Dumps regulary made by mysqldump. Also software on PHP is running on server

Simple move using mysqldump isn't ok, 'cause restoring base is longs about 8 hours. I have no window of time for this...

So, there's a thought: make new server as a slave to existing server, wait till mysql replication sync is done, turn off old server, make slave become master and continue working. Is this possible? Will be there any software-kind problems?

Or, this thought is wrong. If so, how, then, I have to migrate my DB to new hardware and software with minimal downtime?

2 Answers 2

0

Let's assume you're managing your own database instead of AWS managed database.

  1. Make sure you did backup the database, just in case accidental disaster. By default, your database located at /var/lib/mysql. Copy that to a safe place.
  2. Upgrade your old database
  3. Migrate using rsync
0

In your case restoring database is taking more time, so I suggest to use AWS database migration service.

It's very simple,less human work and fastest method. And also your real time data will sync. Instead of replication use this.

1
  • Thank you, but this solution isn't for this task. We don't use any Amazon or other web-services for storing DB. All infrastructure is closed and not for web-access
    – Someone
    Sep 19, 2016 at 7:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.