0

I recently discovered that the master db in a setup I'm running became corrupted. The slave was getting all of the data correctly so I have a solid backup. What I'd like to do is use replication to restore the master from the slave. Most solutions I've seen on the internet say basically "mysqldump your data and then load it in", but I thought making proper use of replication would be more elegant. I saw this link in the MySQL docs, but wasn't sure if it was correct: http://dev.mysql.com/doc/mysql-enterprise-backup/3.6/en/advanced.master.html

I'm running MySQL 5.5 on Ubuntu 14.04 with InnoDB tables.

  • When you say 'so I have a solid backup' what do you mean specifically? A slave by itself is not a backup. It replicates bad data as well as good (such as with a bad INSERT or UPDATE). If you do have a real backup, you copy that data to the system you're trying to restore then start the slave at the binlog position where the backup was made. You cannot rebuild a server using nothing but replication unless you have every binlog file from the moment the database was first written to. All replication does is download the binlog from its' master and apply it locally. – yoonix Sep 29 '14 at 17:10
  • Also, your link is for mysql enterprise backup, not mysql server. That's a commercial product. If you actually have that, you should be on the phone with Oracle using the commercial support you paid for. – yoonix Sep 29 '14 at 17:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.