You can do a two-way replication. According to MySQL docs, however, this
isn't recommended since atomicity of update operations (depending on the
scenario, of course, this isn't a problem).

I'm not sure, but I think that making the master a slave of the slave that
would become a master temporarily wouldn't work well because no binary logs
will have been maintained for such slave (previous master). This is in
theory, of course.

Then, so far, I still think that copying by hand the data dir back to the
master would be the best way (and easiest) to get the master up again and
up-to-date.

[]s,
Conrado


----- Original Message ----- 
From: Steve Williams
To: cvarda
Cc: Batara Kesuma ; [EMAIL PROTECTED]
Sent: Tuesday, March 16, 2004 3:28 AM
Subject: Re: Switch replication master


Hi,

Could you take the database down long enough (scheduled downtime) to make
the master a slave to the slave?  I seem to remember reading on this mail
list that you can do circular replication...  or am I talking nonsense?

That way when you took the "original" master down for maintenance, then
brought it up later, it would synchronize properly.

Maybe someone more knowledgeable will respond...

Cheers,
Steve

cvarda wrote:

Depending on the size of your databases, it might be a good idea to copy
back your 'data' directory from slave to master.

I think this should work better, even because the master wouldn't get the
INSERT/UPDATEs made on the slave.

[]s,
Conrado

----- Original Message ----- 
From: "Batara Kesuma" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, March 15, 2004 2:30 PM
Subject: Switch replication master



Hi,

I use replication with 1 master and 1 slave. Right now the slave is only
used to make a backup. Next week I am going to change my master
motherboard. So I need to take it offline for a while (about 90 minutes).
I am thinking about switching the master for that 90 minutes, so the slave
will become master when master is offline, and after master is back online
switch back slave to slave.

Here is how I am going to do it:
1. Change all my code to make the DB query to slave.
2. Take master offline, change motherboard.
3. Master back online.

How do I switch back the master now? Any idea? I don't mind to take
offline both slave and master for a while if it is not too long. Please
help.








-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to