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.
Uses tidb_snapshot
to provide backup consistency instead of FLUSH TABLES WITH READ LOCK
Includes the hidden _tidb_rowid
column in INSERT
statements when present
Allows 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: NOW()-INTERVAL 1 SECOND.
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.
What’s on this page