MySQL Forums
Forum List  »  Backup

Procedure for backups with replication
Posted by: Patrick Toole
Date: November 03, 2005 07:21PM

Hi,

I am running a dual-master, and I am wondering if anyone has a valid procedure for running a full backup of the servers. Mainly, what I can't figure out is if flushing the tables with a read lock will stop replication so I can purge the binlogs.

As far as I can tell, here's a valid procedure:

1. On Master 1, flush tables with read locks.
2. Check the staus of the slave for Master 2.
3. Perform a full backup of Master 1.
4. Purge binlogs of Master 1 up to the last binlog for the slave on Master 2.
5. Unlock Master 1.

Now, the problem with this is that if there is a failure in the future, the position of Master 2 in Master 1's binlogs will be in the middle (so I'd have to manually store the position in case Master 2 never came back online).

The only other solution I can think of is to lock both databases, and wait until replication finishes, then do a full backup and reset the masters.

Does anyone have suggestions?

Options: ReplyQuote


Subject
Views
Written By
Posted
Procedure for backups with replication
4226
November 03, 2005 07:21PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.