Backup types and Features
Cold (cold Backup): Need to shut down the MySQL service, read and write requests are not allowed in the state;
Win Bei (warm backup): Service online, but only support read requests, do not allow write requests;
Hot backup: The business is not affected at the same time as the backup.
Depending on the scope of the data collection to be backed up
Full backups: Full backup, back up all character sets.
Incremental Backup: Incremental backup data that has changed since the last full or incremental backup, cannot be used alone, and with full backups, the frequency of backups depends on how often the data is updated.
Differential backup: Differential backup data that has changed since the last full backup.
Recommended recovery strategy:
Full + increment + binary log
Full + diff + binary log
Database to make a full backup:
Mysqldump-uroot-p--single-transaction--master-data=2--databases zy >d:\mysql\priv\20171206-1.sql
--single-transaction: Based on this option, the hot standby InnoDB table can be implemented; Therefore,--lock-all-tables is not required at the same time;
--master-data=2 record the location of the binary log at the time of the backup, and comment out that 1 is not annotated
--databases Hellodb Specify the database to be backed up
To view binary information from a backup:
4. Operation of database change information, re-view the data guest log information
Show Master Status
5. Test incremental Backups
6. View operational records for a log point
7. Hot spare the binary log needs to be turned off when importing data
Set sql_log_bin=0
Flush logs--Refresh Log
8. Import a previously backed up binary file
Backup operation for MYSQL