I've run into an unforeseen issue regarding a MySQL Master node: The cloud instance on which it's installed is soon to be retired.
I've not needed to perform a migration like this before, so I'm unsure if one of these options I've come up with is better than the other.
Option 1
I can setup a new server acting as a MySQL Slave and start replicating data to it. I have not yet determined how much data is on the Master, so the replication process may not finish before I need to perform the cutover.
If I go with this option, my plan was to wait for replication to complete and then update the Web Services to point to the MySQL Slave IP address. From reading the MySQL docs, I'm getting the impression I'm unable to do this (start writing to a Slave?).
Option 2
I'm able to create a brand new instance and set this instance as a new MySQL Master. I could then take a Snapshot of the /data
volume, and use this snapshot to create a new volume and attach it to the new MySQL Master instance. Once this is done, I can update the Web Services to use the new IP of the SQL Master.
The problem here is that during the time it takes to perform a snapshot, data is still being written to the original Master. If I were to set the new MySQL Master instance as "live," there would be a loss of data and I can't really think of a way to import those deltas back into the new MySQL Master instance (how would I resolve inserts taking place at different times and primary keys?).
I would really appreciate any tips, tricks, or advice concerning this issue. Thanks in advance.