MySQL Forums
Forum List  »  Backup

Re: MySQLdump pause event.
Posted by: Rick James
Date: March 03, 2012 10:03AM

Your design is good. Your concerns are probably not a problem. No Master interruption is needed.

The meat of it is (on Slave only)...
1. STOP SLAVE SQL_THREAD;
2. mysqldump ...
3. START SLAVE SQL_THREAD;
4. Let replication "catch up"

1 -- This, as you say, lets the slave continue to receive stuff from the Master.
2 -- This runs with essentially no interference, blocking, etc.
3 -- Back to normal. Almost...
4 -- There will be some time before the "relay log" is replayed through the SQL_THREAD. Keep an eye on Seconds_behind_master if you care about how far behind replication still is.

Note: This mechanism does not necessarily allow full readonly access to the slave. (But you did not mention that as a requirement.)

Another way to do the dump on Slave:
1. Stop mysqld (to get everything in RAM flushed to disk, to make the entire dump "consistent")
2. Copy entire disk tree (using cp, scp, tar, gzip, netcat, or whatever)
3. Start mysqld
4. Let replication catchup

Options: ReplyQuote


Subject
Views
Written By
Posted
3130
March 02, 2012 03:46AM
Re: MySQLdump pause event.
1661
March 03, 2012 10:03AM
1910
March 06, 2012 09:24AM


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.