backup-and-recovery.md 4.4 KB
Newer Older
茶陵後's avatar
茶陵後 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
# Chapter 7 Backup and Recovery

**Table of Contents**

[7.1 Backup and Recovery Types](backup-types.html)
[7.2 Database Backup Methods](backup-methods.html)
[7.3 Example Backup and Recovery Strategy](backup-strategy-example.html)
[7.3.1 Establishing a Backup Policy](backup-policy.html)
[7.3.2 Using Backups for Recovery](recovery-from-backups.html)
[7.3.3 Backup Strategy Summary](backup-strategy-summary.html)
[7.4 Using mysqldump for Backups](using-mysqldump.html)
[7.4.1 Dumping Data in SQL Format with mysqldump](mysqldump-sql-format.html)
[7.4.2 Reloading SQL-Format Backups](reloading-sql-format-dumps.html)
[7.4.3 Dumping Data in Delimited-Text Format with mysqldump](mysqldump-delimited-text.html)
[7.4.4 Reloading Delimited-Text Format Backups](reloading-delimited-text-dumps.html)
[7.4.5 mysqldump Tips](mysqldump-tips.html)
[7.5 Point-in-Time (Incremental) Recovery](point-in-time-recovery.html)
[7.5.1 Point-in-Time Recovery Using Binary Log](point-in-time-recovery-binlog.html)
[7.5.2 Point-in-Time Recovery Using Event Positions](point-in-time-recovery-positions.html)
[7.6 MyISAM Table Maintenance and Crash Recovery](myisam-table-maintenance.html)
[7.6.1 Using myisamchk for Crash Recovery](myisam-crash-recovery.html)
[7.6.2 How to Check MyISAM Tables for Errors](myisam-check.html)
[7.6.3 How to Repair MyISAM Tables](myisam-repair.html)
[7.6.4 MyISAM Table Optimization](myisam-optimization.html)
[7.6.5 Setting Up a MyISAM Table Maintenance Schedule](myisam-maintenance-schedule.html)

[]()[]()

 It is important to back up your databases so that you can recover your data and be up and running again in case problems occur, such as system crashes, hardware failures, or users deleting data by mistake. Backups are also essential as a safeguard before upgrading a MySQL installation, and they can be used to transfer a MySQL installation to another system or to set up replica servers.

 MySQL offers a variety of backup strategies from which you can choose the methods that best suit the requirements for your installation. This chapter discusses several backup and recovery topics with which you should be familiar:

* Types of backups: Logical versus physical, full versus incremental, and so forth.

* Methods for creating backups.

* Recovery methods, including point-in-time recovery.

* Backup scheduling, compression, and encryption.

* Table maintenance, to enable recovery of corrupt tables.

## Additional Resources

 Resources related to backup or to maintaining data availability include the following:

* Customers of MySQL Enterprise Edition can use the MySQL Enterprise Backup product for backups. For an overview of the MySQL Enterprise Backup product, see [Section 30.2, “MySQL Enterprise Backup Overview”](mysql-enterprise-backup.html).

* A forum dedicated to backup issues is available at [https://forums.mysql.com/list.php?28](https://forums.mysql.com/list.php?28).

* Details for [**mysqldump**](mysqldump.html) can be found in [Chapter 4, *MySQL Programs*](programs.html).

* The syntax of the SQL statements described here is given in [Chapter 13, *SQL Statements*](sql-statements.html).

* For additional information about `InnoDB` backup procedures, see [Section 15.18.1, “InnoDB Backup”](innodb-backup.html).

* Replication enables you to maintain identical data on multiple servers. This has several benefits, such as enabling client query load to be distributed over servers, availability of data even if a given server is taken offline or fails, and the ability to make backups with no impact on the source by using a replica. See [Chapter 17, *Replication*](replication.html).

* MySQL InnoDB Cluster is a collection of products that work together to provide a high availability solution. A group of MySQL servers can be configured to create a cluster using MySQL Shell. The cluster of servers has a single source, called the primary, which acts as the read-write source. Multiple secondary servers are replicas of the source. A minimum of three servers are required to create a high availability cluster. A client application is connected to the primary via MySQL Router. If the primary fails, a secondary is automatically promoted to the role of primary, and MySQL Router routes requests to the new primary.

* NDB Cluster provides a high-availability, high-redundancy version of MySQL adapted for the distributed computing environment. See [Chapter 23, *MySQL NDB Cluster 8.0*](mysql-cluster.html), which provides information about MySQL NDB Cluster 8.0.