We can perform full backup every day for a small amount of mysql Incremental Backup databases, because this does not take much time, but when the database is very large, we are unlikely to perform a full backup every day, in addition, it is changed to a weekly full backup, and an incremental backup every day is similar to this backup policy. The principle of Incremental backup is to use mysql binary logs, so we must enable the binary log function. Www.2cto.com I. Incremental Backup 1. For example, we make a full backup at eleven o'clock P.M. on Sunday: mysqldump -- single-transaction -- flush-logs -- master-data = 2 -- all-databases> fullbackup_sunday_11_PM. SQL two rows are displayed in the SQL file: -Position to start replication or point-in-time recovery from-change master to MASTER_LOG_FILE = 'bin-log.000002 ', MASTER_LOG_POS = 107; the second line contains the information we need, the changes after the backup are saved to the bin-log.000002 binary. 2. Then we make an incremental backup at eleven o'clock P.M. on Monday: mysqladmin flush-logs will generate a new binary log file bin-log.000003, bin-log.000002 stores all the changes since eleven o'clock P.M. Sunday till now, and we just need to back up this file to a safe place. Then on Tuesday we made an incremental backup, or execute the same command, and then we saved the bin-log.000003 file. 2. Recover the backup. For example, if a fault occurs at noon on Wednesday, we need to first import the complete backup on Sunday: mysql <fullbackup_sunday_3_AM. SQL and then import the Incremental backup on Monday and Tuesday: mysqlbinlog bin-log.000002 bin-log.000003 | mysql at this time we have recovered all the backup data, we can also find the bin-log.000004 to further restore the latest data.