mydumper is a fork of the Mydumper project with additional functionality specific to TiDB. It is the recommended method to use for logical backups of TiDB.
It can be downloaded as part of the Enterprise Tools package.
tidb_snapshot to provide backup consistency instead of
FLUSH TABLES WITH READ LOCK
tidb_snapshot to be configurable (i.e. backup data as it appeared at an earlier point in time)
-z, --tidb-snapshot: Set the tidb_snapshot to be used for the backup. Default: The current TSO (UniqueID from SHOW MASTER STATUS). Accepts either a TSO or valid datetime. For example: -z "2016-10-08 16:45:26"
Command line parameter:
./bin/mydumper -h 127.0.0.1 -u root -P 4000
Source code for PingCAP’s Mydumper is available on GitHub.
Yes, we intend to make our changes available to upstream Mydumper. See PR #155.