Simple mysqldump full database backup + binlog incremental backup and restore
- First use mysqldump for full database backup, we use full backup
A full backup is a backup of the entire database. The backup operation is simple; the time is long, the memory is large, and there are many repetitions.
The number 02 is the newly generated log record file, which is used to save the subsequent database operation records
2) binlog incremental backup
Incremental backup: no duplicate data, small amount, short time; it needs to be based on the last full backup, and the operation is complicated.
Insert data into the table, simulate the operation of adding, deleting, modifying and checking
Generate a new binlog log
Simulate the deletion of the table asd in the book database by mistake
3) Use mysql full backup and incremental backup for data restoration.
In order to prevent a large number of binary logs during restoration, we can temporarily close the binary log and then restore
Restoring from a full backup
Check the full restore result, see the status of the full backup is successful, and then perform incremental backup and restore
Because I only made an incremental backup, I can restore it directly
Check it out, it's all back
Turn on the binary log function after the database is restored