List:Replication« Previous MessageNext Message »
From:Rick James Date:September 7 2010 11:40pm
Subject:Re: Restore with a different master
View as plain text  
  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<marcus@stripped>  escreveu:
>
> De: Marcus Bointon<marcus@stripped>
> Assunto: Restore with a different master
> Para: "Replication replication"<replication@stripped>
> 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

Thread
Restore with a different masterMarcus Bointon7 Sep
  • Re: Restore with a different masterMarcus Bointon7 Sep
  • Re: Restore with a different masterEber Duarte7 Sep
    • Re: Restore with a different masterRick James8 Sep