Https://help.aliyun.com/knowledge_detail/41738.html
MySQL full: Record pos location
Mysqldump-h10.10.10.1-uadmin-p--master-data=2--single-transaction-r--events-q--all-databases > 2.sql
Cat 2.sql |head-22
22 Rows in the exported backup see the POS location point and the specific Binlog file name
Change MASTER to master_log_file= ' mysql-bin.000955 ', master_log_pos=65546478
then restore with the following command 1
or we can find the specific time information at the POS point and then restore it, the command is as follows 2
To restore the binary log to a readable state:
Mysqlbinlog--no-defaults-v--base64-output=decode-rows mysql-bin.000955 > Binlog111.sql
restore Binlog to the database
Command 1
Mysqlbinlog mysql-bin.000688 mysql-bin.000689--start-position=531167--stop-datetime= "16-05-16 18:05:03" | Mysql-uroot-p-p3306-h *.*.*.*
Command 2
Mysqlbinlog mysql-bin.000688 mysql-bin.000689--start-datetime= "17-06-06 10:05:03"--stop-datetime= "17-06-06 18:05:03 "| Mysql-uroot-p-p3306-h *.*.*.*
# Mysqlbinlog Other parameters that can be used
#--database db_name Specifies only incremental recovery of data db_name the specified database
#--start-position Specifies the Binlog point at which to start the recovery, which should exist in the specified first Binlog file.
#--stop-position Specifies the Binlog site to revert to, which should exist in the last Binlog file specified.
#--START-DATETIME Specifies the point in time at which to start the recovery (starting from the first Binlog event equal to or greater than that point in time).
# in the local time zone, the format is the time format that MySQL can accept, such as "2016-05-16 08:01:05" or "16-05-16 08:01:05".
#--STOP-DATETIME Specifies a point in time at which to stop the recovery (at the first Binlog event that is equal to or greater than that point in time).
# in the local time zone, the format is the time format that MySQL can accept, such as "2016-05-16 08:01:05" or "16-05-16 08:01:05".
MySQL Backup tool--mysqldump Backup and recovery