List:General Discussion« Previous MessageNext Message »
From:a.smith Date:October 19 2010 9:55am
Subject:Re: Failover on master/slave replication
View as plain text  
Quoting Machiel Richards <machielr@stripped>:

>
>         The question I have however is how do you fail over to the slave
> server in the event that the master server is unavailable and then how
> to revert back to the master server once the server is available again.
>

Hi,

   to fail over to the slave, you dont need to do anything (except be  
sure that replication is off). That is, tell your apps etc to use the  
slave IP/hostname, change the slave server IP to that of the master or  
update DNS so that all connections are made to the slave instead of  
the master.

To reinstate the master after a failover, you must copy your live  
database (now on slave) to the master and reinitiate replication  
pretty much as you did when replication was initially setup. Copying  
the live DB can be achieved via restoring a backup (from the live  
slave) or you could look at Maakit which can analyse table differences  
and copy only changed data (useful for very large DBs, Ive not  
personally used it tho).

Thats about it I think, unless anyone wants to correct me on that...

thanks Andy.



Thread
Failover on master/slave replicationMachiel Richards19 Oct
  • Re: Failover on master/slave replicationa.smith19 Oct
    • Re: Failover on master/slave replicationJohan De Meersman19 Oct
      • Re: Failover on master/slave replicationJohn Daisley19 Oct
        • Re: Failover on master/slave replicationWalter Heck20 Oct
  • RE: Failover on master/slave replicationJerry Schwartz19 Oct