From: Rick James Date: September 7 2010 11:40pm Subject: Re: Restore with a different master List-Archive: http://lists.mysql.com/replication/1939 Message-Id: <4C86CD5D.9000108@yahoo-inc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit I hope you are not writig to both A and B. Assuming A is Read/Write and B is readonly, I would stop B, clone it to make C, then play with CHANGE MASTER as needed to achieve the new config. Clone = Stop mysqld, copy .../mysql/ tree, start mysql on both. On 9/7/10 12:19 PM, Eber Duarte wrote: > Hi Marcus, > > You can setup C as slave of B, in order to avoid extra traffic on master (A), as you said. After that, as you have only A active (writes is going through this server, right?), you can stop slave on B and wait for C to catch up. At this time you can issue a change master on C redirecting it to the same point where B is, since both are in the same position considering A binary log. Finally, break replication B->A and setup C->A and retire B server. > > That is it. Hope it helps! > > Regards, > > Eber. > > --- Em ter, 7/9/10, Marcus Bointon escreveu: > > De: Marcus Bointon > Assunto: Restore with a different master > Para: "Replication replication" > Data: Terça-feira, 7 de Setembro de 2010, 14:17 > > I have a pair of servers running standard active/passive circular replication using mmm, call them A and B. I want to introduce new server C, ultimately to replace B. I'm setting it up by restoring an xtrabackup snapshot taken from B (using the practice of doing backups on a slave to keep backup traffic off the active master). I know the details of the master log and position for the backup, but it's from B not A, and though there must be one, I've no way of knowing what the corresponding log and position on A is. > > Here's the background: I want to move from: > > A<-> B > > to (slave C from A) > > C<- A<-> B > > to (break replication back from B) > > C<- A -> B > > to (close loop from A to C) > > C<-> A -> B > > to (remove B) > > C<-> A > > As far as I can see I can either: > • Take a new backup from A > • Switch B to be active master and retire A instead (A and B are identical) > > Any other suggestions? > > Marcus -- Rick James - MySQL Geek