## Deploy TiUPcurl --proto '=https' --tlsv1.2 -sSf https://tiup-mirrors.pingcap.com/install.sh | shsource /root/.bash_profile## Deploy Dumpling and upgrade to the latest versiontiup install dumplingtiup update --self && tiup update dumpling
SET GLOBAL tidb_gc_enable = FALSE;
SELECT @@global.tidb_gc_enable;
+-------------------------+| @@global.tidb_gc_enable |+-------------------------+| 0 |+-------------------------+1 row in set (0.00 sec)
tiup dumpling -u root -P 4000 -h tidb_host -o /tmp/test
metadata: contains the export start time and the binlog position of the master database{schema}-schema-create.sql: SQL file for creating schema{schema}.{table}-schema.sql: SQL file for creating tables{schema}.{table}.{0001}.{sql|csv}: data file*-schema-view.sql, *-schema-trigger.sql, *-schema-post.sql: other exported SQL filesStarted dump at: 2025-12-02 12:42:53SHOW MASTER STATUS:Log: tidb-binlogPos: 462583122654920710GTID:Finished dump at: 2025-12-02 12:42:53
Pos is followed by a number representing the TiDB timestamp used for export. This timestamp will be used as the starting point for TiCDC replay in subsequent incremental migration settings.-d is the directory exported by Dumpling in the previous example.myloader -h tdsql_host -P 3306 --user tdsqluser -d /tmp/test
start-ts to the timestamp obtained from the Dumpling metadata. For details, refer to the TiDB official documentation.tiup cdc cli changefeed create --server=http://ticdc_host:8300 --sink-uri='mysql://tdsql_user@tdsql_host:3306' --changefeed-id="upstream-to-downstream" --start-ts="462583122654920710"
SET GLOBAL tidb_gc_enable = TRUE;
SELECT @@global.tidb_gc_enable;
+-------------------------+| @@global.tidb_gc_enable |+-------------------------+| 1 |+-------------------------+1 row in set (0.00 sec)
Feedback