MySQL Forums
Forum List  »  MySQL Administrator

Re: binlog file deleted accidentally
Posted by: Scott Nemes
Date: August 15, 2012 04:41PM

Unfortunately it is a little more involved than that when you want to setup replication as well.

The easiest way in my opinion is to use Percona's XtraBackup (http://www.percona.com/doc/percona-xtrabackup/), which will allow you to do a hot backup (if all of your tables are InnoDB) of your master and easily record the replication coordinates. Percona has a simple guide to walk you through this: http://www.percona.com/doc/percona-xtrabackup/howtos/setting_up_replication.html

If you want to use mysqldump still, then you need to get a bit more fancy. The easiest way to do that is outlined in the manual (http://dev.mysql.com/doc/refman/5.5/en/replication-howto-mysqldump.html), but note that this method will require the locking of the master, which will prevent data modification on the master during the dump. If that is not an issue, then that guide will work fine.

If neither of those solutions will fit your needs, let me know and I can go into more detail on a possible third method with mysqldump that does not require locking but is more risky.

--
Scott Nemes
MySQL DBA

http://www.linkedin.com/in/scottnemes
http://www.twitter.com/ScottNemes

Options: ReplyQuote


Subject
Written By
Posted
Re: binlog file deleted accidentally
August 15, 2012 04:41PM


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.