MySQL Backup and Recovery

Abstract

This is the MySQL Backup and Recovery extract from the MySQL 5.5 Reference Manual.

For legal information, see the Legal Notices.

For help with using MySQL, please visit either the MySQL Forums or MySQL Mailing Lists, where you can discuss your issues with other MySQL users.

For additional documentation on MySQL products, including translations of the documentation into other languages, and downloadable versions in variety of formats, including HTML and PDF formats, see the MySQL Documentation Library.

Licensing information—MySQL 5.5.  This product may include third-party software, used under license. If you are using a Commercial release of MySQL 5.5, see this document for licensing information, including licensing information relating to third-party software that may be included in this Commercial release. If you are using a Community release of MySQL 5.5, see this document for licensing information, including licensing information relating to third-party software that may be included in this Community release.

Licensing information—MySQL Cluster NDB 7.2.  This product may include third-party software, used under license. If you are using a Commercial release of MySQL Cluster NDB 7.2, see this document for licensing information, including licensing information relating to third-party software that may be included in this Commercial release. If you are using a Community release of MySQL Cluster NDB 7.2, see this document for licensing information, including licensing information relating to third-party software that may be included in this Community release.

Document generated on: 2016-08-04 (revision: 48445)


Table of Contents

Preface and Legal Notices
1 Backup and Recovery
1.1 Backup and Recovery Types
1.2 Database Backup Methods
1.3 Example Backup and Recovery Strategy
1.3.1 Establishing a Backup Policy
1.3.2 Using Backups for Recovery
1.3.3 Backup Strategy Summary
1.4 Using mysqldump for Backups
1.4.1 Dumping Data in SQL Format with mysqldump
1.4.2 Reloading SQL-Format Backups
1.4.3 Dumping Data in Delimited-Text Format with mysqldump
1.4.4 Reloading Delimited-Text Format Backups
1.4.5 mysqldump Tips
1.5 Point-in-Time (Incremental) Recovery Using the Binary Log
1.5.1 Point-in-Time Recovery Using Event Times
1.5.2 Point-in-Time Recovery Using Event Positions
1.6 MyISAM Table Maintenance and Crash Recovery
1.6.1 Using myisamchk for Crash Recovery
1.6.2 How to Check MyISAM Tables for Errors
1.6.3 How to Repair MyISAM Tables
1.6.4 MyISAM Table Optimization
1.6.5 Setting Up a MyISAM Table Maintenance Schedule
2 Using Replication for Backups
2.1 Backing Up a Slave Using mysqldump
2.2 Backing Up Raw Data from a Slave
2.3 Backing Up a Master or Slave by Making It Read Only
3 InnoDB Backup and Recovery
3.1 The InnoDB Recovery Process