MySQL Forums
Forum List  »  Replication

Re: Replication without locking or stopping master.
Posted by: Rick James
Date: March 06, 2013 09:26AM

If writes are happening while you are taking a backup, and there are not locks, then the backup may or may not include those writes. Suppose...

1. You are dumping tableA and writes are occurring to tableB.
2. After that, you are dumping tableB and writes are occurring to tableA.

Your dump will include the writes to tableB, but not the writes to tableA.
The position you picked in the binlog includes neither of the writes.

This is a simplified picture; it is essentially impossible to be sure you get a _consistent_ dump of _some_ point in time.

All is not lost... Percona's XtraBackup (free) plays games with transactions in a way that lets it take a backup _while_ writes are occurring. There is a brief lock when it finishes things up. It handles MyISAM in the same old brute force way -- lock long enough to dump all MyISAM tables.

So, switch all your tables (not `mysql` tables) to InnoDB, and use XtraBackup.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Replication without locking or stopping master.
918
March 06, 2013 09:26AM


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.