tencent cloud

TDSQL Boundless

Release Notes
Product Introduction
Overview
Scenarios
Product Architecture
Instance Types
Compatibility Notes
Kernel Features
Kernel Overview
Kernel Version Release Notes
Functionality Features
Performance Features
Billing
Billing Overview
Purchase Method
Pricing Details
Renewal
Overdue Payments
Refund
Getting Started
Creating an Instance
Connect to Instances
User Guide
Data Migration
Data Subscription
Instance Management
Configuration Change
Parameter Configuration
Account Management
Security Group
Backup and Restoration
Database Auditing
Tag Management
Use Cases
Technical Evolution and Usage Practices of Online DDL
Lock Mechanism Analysis and Troubleshooting Practices
Data Intelligent Scheduling and Related Practices for Performance Optimization
TDSQL Boundless Selection Guide and Practical Tutorial
Developer Guide
Developer Guide (MySQL Compatibility Mode)
Developer Guide (HBase Compatibility Mode)
Performance Tuning
Performance Tuning Overview
SQL Tuning
DDL Tuning
Performance White Paper
Performance Overview
TPC-C Test
Sysbench Test
API Documentation
History
Introduction
API Category
Making API Requests
Instance APIs
Security Group APIs
Task APIs
Backup APIs
Rollback APIs
Parameter APIs
Database APIs
Data Types
Error Codes
General Reference
System Architecture
SQL Reference
Database Parameter Description
TPC-H benchmark data model reference
Error Code Information
Security and Compliance
FAQs
Agreements
Service Level Agreement
Terms of Service
Privacy Policy
Data Processing And Security Agreement
Contact Us
Glossary
DocumentaçãoTDSQL BoundlessUser GuideData MigrationMigrate Small Data Volume from TiDB Instance to TDSQL Boundless

Migrate Small Data Volume from TiDB Instance to TDSQL Boundless

PDF
Modo Foco
Tamanho da Fonte
Última atualização: 2026-03-06 18:50:07
Dumpling is a tool that exports TiDB data into SQL or CSV files. This document describes how to use Dumpling to export full data from a self-hosted TiDB cluster.

Prerequisites

1. Prepare the deployment environment.
It is recommended to deploy Dumpling on servers that have network connectivity with the source MySQL/TiDB and target TDSQL Boundless instances awaiting migration.
2. Deploy Dumpling with TiUP
## Deploy TiUP
curl --proto '=https' --tlsv1.2 -sSf https://tiup-mirrors.pingcap.com/install.sh | sh
source /root/.bash_profile

## Deploy Dumpling and upgrade to the latest version
tiup install dumpling
tiup update --self && tiup update dumpling
3. Configure the required permissions for Dumpling
You require the following permissions to export data from the upstream database:
SELECT
RELOAD
LOCK TABLES
REPLICATION CLIENT
PROCESS

Steps

The following example demonstrates how to use Dumpling to export SQL files from TiDB, import them into TDSQL Boundless using the community tool myloader, and enable TiCDC for incremental synchronization.
1. Disable the GC temporarily for the upstream TiDB cluster.
To ensure that newly written data is not lost during incremental migration, you should disable the garbage collection (GC) for the upstream cluster before the migration is started. In this way, history data is not deleted.
Run the following command to disable GC:
SET GLOBAL tidb_gc_enable = FALSE;
To verify that the change takes effect, query the value of tidb_gc_enable:
SELECT @@global.tidb_gc_enable;
The following is an example output, where 0 indicates disabled.
+-------------------------+
| @@global.tidb_gc_enable |
+-------------------------+
| 0 |
+-------------------------+
1 row in set (0.00 sec)
2. Run Dumpling to export the full data as SQL files.
tiup dumpling -u root -P 4000 -h tidb_host -o /tmp/test
Dumpling exports data in SQL format by default. For partial data export or filtering, refer to the Dumpling usage instructions.
3. Check the exported data.
Typically, exported data includes the following:
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 files
Take the following metadata file as an example:
Started dump at: 2025-12-02 12:42:53
SHOW MASTER STATUS:
Log: tidb-binlog
Pos: 462583122654920710
GTID:

Finished dump at: 2025-12-02 12:42:53
Where 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.
4. Import Data
Use the myloader tool to import data. In the following example, the directory used in -d is the directory exported by Dumpling in the previous example.
myloader -h tdsql_host -P 3306 --user tdsqluser -d /tmp/test
5. Performing incremental synchronization via TiCDC. In the following example, set 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"
6. To resume GC of TiDB, run the following command:
SET GLOBAL tidb_gc_enable = TRUE;
To verify that the change takes effect, query the value of tidb_gc_enable:
SELECT @@global.tidb_gc_enable;
The expected output is 1, indicating that it is enabled:
+-------------------------+
| @@global.tidb_gc_enable |
+-------------------------+
| 1 |
+-------------------------+
1 row in set (0.00 sec)

Ajuda e Suporte

Esta página foi útil?

comentários