Technical Implementation Plan for Synchronizing Data from TiDB to MySQL

This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: 关于从TiDB同步数据到MySQL技术实施方案

| username: terry0219

[TiDB Usage Environment] Testing/PoC
[TiDB Version] 7.5.1
I want to use a tool to synchronize TiDB data to downstream MySQL as a backup database. The method I currently understand is to first use Dumpling for full export, and then use TiCDC for incremental updates. If the data volume in the upstream TiDB is relatively large, such as around 4T, how efficient is Dumpling? Is this the way to perform synchronization? Has anyone implemented a similar solution?

| username: Daniel-W | Original post link

The efficiency of Dumpling is quite good.

| username: WalterWj | Original post link

Based on experience, with default parameters, 4TB can be backed up in 4 hours.

| username: tidb菜鸟一只 | Original post link

For migrating from TiDB to MySQL, you would need to use Dumpling and CDC. Dumpling is quite efficient.

| username: zhanggame1 | Original post link

Version 7.5.1 has no issues; the speed depends on your disk and network bandwidth. Lower versions of TiDB using dumpling may result in OOM (Out of Memory).

| username: mono | Original post link

Are you planning to migrate back to MySQL from TiDB? I migrated from MySQL to TiDB. It went smoothly using DM.

| username: 像风一样的男子 | Original post link

If the data volume is large, I’m afraid your MySQL will crash.

| username: Kongdom | Original post link

It is estimated that disk and bandwidth are the biggest bottlenecks, while the tools are not the bottleneck, after all, they are endorsed by the official.

| username: terry0219 | Original post link

It’s not about migration, just setting up a standby database.

| username: Daniel-W | Original post link

It also depends on the specific machine configuration. :face_with_peeking_eye:

| username: WalterWj | Original post link

Yes, poor hardware indeed can’t achieve it…

| username: DBAER | Original post link

dumpling or cdc

| username: TiDBer_lEE0p32k | Original post link

Dumpling is quite efficient.

| username: kelvin | Original post link

First dumpling, then cdc is feasible.

| username: TiDBer_小阿飞 | Original post link

It’s not migrating back to a standalone MySQL, right? MySQL cluster? Similar to HotDB? Dumpling for full export, TICDC for incremental.

| username: TiDBer_HErMeXDz | Original post link

The efficiency of Dumpling is acceptable… Even if it’s a bit slower, it doesn’t have a significant impact on the business…

| username: Jellybean | Original post link

The suggestion is to use Dumpling for bulk data migration.

| username: 友利奈绪 | Original post link

First dumpling, then cdc.

| username: RyanHowe | Original post link

We use BR+CDC here; you can also use DTS in cloud services.

| username: dba-kit | Original post link

A few days ago, I just tested it. Under the premise of limiting the concurrency of exports to 8, exporting 8.8 billion records from MySQL (16C32G) took a total of 7 hours and 28 minutes. If the table data distribution is relatively even without particularly large tables, the time can be even shorter.