MySQL binlog Point-in-time Recovery (mysqlbinlog)

Just for my own quick reference

Official Document: https://mariadb.com/kb/en/mariadb/mysqlbinlog-options/

Some Important parameters:

To generate human readable and grep-able SQL for binlog_format=row:
--base64-output=DECODE-ROWS --verbose

To specify datetime range:
--start-datetime
--stop-datetime

To specify binlog position:

--start-position
--stop-position

Create SQL within specified time-frame:

Create SQL within specified binlog position:

Restore generated SQL:

 

Leave a Reply

Your email address will not be published.