Can TiDB use the mysqldump tool for backups?

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

Original topic: tidb能用mysqldump工具备份吗

| username: 等一分钟

Can TiDB backups be done using MySQL’s mysqldump tool? Is it compatible?

| username: xfworld | Original post link

A small amount is fine, but if the volume is slightly larger, consider this:

Logical backup…

| username: 等一分钟 | Original post link

OK, let me try.

| username: Kongdom | Original post link

Sure, but it’s not necessary. Moreover, TiDB has also modified mysqldump.
https://docs.pingcap.com/zh/tidb/v4.0/mydumper-overview#mydumper-使用文档

| username: zhanggame1 | Original post link

TiDB mainly uses Dumpling for backups, which is more convenient.

| username: wangccsy | Original post link

Later tools are definitely meant to improve upon the original tools.

| username: Jellybean | Original post link

TiDB is a distributed database compatible with the MySQL protocol. Mysqldump, a commonly used data export tool for MySQL, can certainly be used with TiDB as well.

However, mysqldump is a single-threaded, logical export or logical backup tool, and its performance and efficiency are only suitable for scenarios with small amounts of data.

TiDB, as an excellent distributed database capable of storing massive amounts of data, has better tools for similar scenarios, such as the Dumpling logical export tool or the BR physical backup tool. These tools support multi-concurrent and multi-demand scenarios. If you are using TiDB, it is recommended to use the official tools provided.

For recovery, or real-time backup and real-time recovery scenarios, the official solutions and tools are also comprehensive. For detailed introductions, you can refer to the official website.

| username: 等一分钟 | Original post link

Thank you!

| username: dba远航 | Original post link

It can be used.

| username: 烂番薯0 | Original post link

I don’t think so. TiDB uses SST, while MySQL uses IDB. They can’t be used interchangeably, right?

| username: 路在何chu | Original post link

Isn’t dumpling better than this?

| username: 等一分钟 | Original post link

Okay, I’ll give it a try.

| username: xingzhenxiang | Original post link

For large amounts of data, Dumpling works well. For smaller amounts of data, you can also try mysqldump.

| username: FutureDB | Original post link

The official dumpling export tool is indeed useful. I have previously used dumpling to export a large table of 200GB, and it was able to export normally.

| username: FutureDB | Original post link

Dumpling can also export table structures and table data. In some data migration scenarios between TiDB clusters, it can be used together with Lightning to complete data migration.

| username: TiDBer_lBAxWjWQ | Original post link

Using dumpling is better.

| username: 啦啦啦啦啦 | Original post link

I haven’t tried it, but I feel that mysqldump can’t get a consistent backup in TiDB because it can’t execute FLUSH TABLES WITH READ LOCK.

| username: andone | Original post link

It can be used, no problem, it is compatible.

| username: xingzhenxiang | Original post link

There are no issues with dumpling for tables of several terabytes.

| username: 哈喽沃德 | Original post link

Isn’t Dumpling good?