Doing the Replication Shuffle
Here's the scenario. You have three hosts, a master (M) and two replicas (R and S).o
M / \ R S
You want to move the replica S so that its master is R, like so:
#Remastering MySQL Replicas
The scenario here is that we have two replicas, A and B, which both share a master M. We want to make B a replica of A, so that the replication chain goes M > A > B. A prerequesite is that A needs to have binary logging enabled with
log_slave_updates turned on, and A should not be receiving any local writes other than from replication.
In order to achieve the switch we need to have a single point in time at which we know both A's replicaton position relative to the master M, and A's own binary log position. Then we need to make B reach the exact same position relative to the master, at which point we can change master to point at the corresponding coordinates on A.
This procedure involves stopping and restarting replication on both replicas; very briefly on A, but a couple of times on B. It shouldn't be performed on hosts that are especially sensitive to replication delay. However even when carrying out this process by hand the delay shouldn't exceed more than a few minutes,
|ksp="$HOME/Library/Application Support/Steam/SteamApps/common/Kerbal Space Program/KSP.app/Contents"|
|# Take an optional destination argument in case the destination file has a different name.|
|if [ "Z$2" != "Z" ]|
I hereby claim:
To claim this, I am signing this object: