Documentation Home
MySQL Backup and Recovery
Related Documentation Download this Excerpt
PDF (US Ltr) - 260.6Kb
PDF (A4) - 260.9Kb
EPUB - 78.6Kb
HTML Download (TGZ) - 60.3Kb
HTML Download (Zip) - 66.9Kb


MySQL Backup and Recovery  /  Using Replication for Backups

Chapter 2 Using Replication for Backups

To use replication as a backup solution, replicate data from the master to a slave, and then back up the data slave. The slave can be paused and shut down without affecting the running operation of the master, so you can produce an effective snapshot of live data that would otherwise require the master to be shut down.

How you back up a database depends on its size and whether you are backing up only the data, or the data and the replication slave state so that you can rebuild the slave in the event of failure. There are therefore two choices:

  • If you are using replication as a solution to enable you to back up the data on the master, and the size of your database is not too large, the mysqldump tool may be suitable. See Section 2.1, “Backing Up a Slave Using mysqldump”.

  • For larger databases, where mysqldump would be impractical or inefficient, you can back up the raw data files instead. Using the raw data files option also means that you can back up the binary and relay logs that will enable you to recreate the slave in the event of a slave failure. For more information, see Section 2.2, “Backing Up Raw Data from a Slave”.


User Comments
Sign Up Login You must be logged in to post a comment.