MySQL Forums
Forum List  »  Backup

Re: mysql 5.5 mysqldump
Posted by: Rick James
Date: November 19, 2011 08:47PM

> I know that we have to run the backups on the master
Why? The Slave is effectively a backup. Also, you can take the slave offline and back it up.

What you can get any backup is a "snapshot in time". If the Slave is writing its own binlog, then everything after that 'time' is new stuff that could be applied in a restore situation.

"Relay logs" are the stuff that came from the master, and have (or have not yet) been applied to the slave. I would not depend on it for a backup.

Another way to backup is
1. Stop mysqld on the Slave
2. copy the entire data tree
3. Restart mysqld and wait for it to catchup
Everything you need to restore that slave to that point in time is in those files. Every thing (except for my.cnf) is available for building a new slave (and letting it catchup).

I'm not a fan of incremental backups.

> do i need to stop the SLAVE SQL THREAD and then take a mysqldump?
The issue is to get a "consistent" dump. This involves some amount of locking. You may as well stop the SQL THREAD. Leaving the IO THREAD running is a good idea -- it will continue to collect stuff from the Master. This makes your "window of vulerability" smaller. (And essentially, that is why there are those two 'threads'.)

Options: ReplyQuote


Subject
Views
Written By
Posted
3059
November 18, 2011 04:22PM
1475
November 19, 2011 03:08PM
Re: mysql 5.5 mysqldump
1402
November 19, 2011 08:47PM
1484
November 20, 2011 10:04PM
1907
November 22, 2011 12:14AM


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.