MyFlash is an open source tool released by Meituan-Dianping which can be used to flashback MySQL DML data.here's the github link: https://github.com/Meituan-Dianping/MyFlash
after downloaded the tool and extracted the zip package,i got this structure:
1 [root@zlm1 16:25:26 /vagrant/MyFlash-master] 2 #ls -l 3 total 8 4 drwxrwxrwx 1 vagrant vagrant 0 Jun 1 16:17 binary 5 -rwxrwxrwx 1 vagrant vagrant 95 Oct 25 2017 build.sh 6 drwxrwxrwx 1 vagrant vagrant 0 Jun 1 16:17 doc 7 -rwxrwxrwx 1 vagrant vagrant 1103 Oct 25 2017 License.md 8 -rwxrwxrwx 1 vagrant vagrant 1273 Oct 25 2017 README.md 9 drwxrwxrwx 1 vagrant vagrant 0 Jun 1 16:17 source 10 drwxrwxrwx 1 vagrant vagrant 4096 Jun 1 16:17 testbinlog
the official document recommend to install the tool by dynamic compliling link way to install,but i prefer to use the binary way instead.let's see the parameter and usage of the command:
1 [root@zlm1 16:27:20 /vagrant/MyFlash-master/binary] 2 #./flashback --help 3 Usage: 4 flashback [OPTION...] 5 Help Options: 6 -h, --help Show help options 7 Application Options: 8 --databaseNames databaseName to apply. if multiple, seperate by comma(,) 9 --tableNames tableName to apply. if multiple, seperate by comma(,) 10 --start-position start position 11 --stop-position stop position 12 --start-datetime start time (format %Y-%m-%d %H:%M:%S) 13 --stop-datetime stop time (format %Y-%m-%d %H:%M:%S) 14 --sqlTypes sql type to filter . support INSERT, UPDATE ,DELETE. if multiple, seperate by comma(,) 15 --maxSplitSize max file size after split, the uint is M 16 --binlogFileNames binlog files to process. if multiple, seperate by comma(,) 17 --outBinlogFileNameBase output binlog file name base 18 --logLevel log level, available option is debug,warning,error 19 --include-gtids gtids to process 20 --exclude-gtids gtids to skip