Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.Original topic: tidb能用mysqldump工具备份吗
Can TiDB backups be done using MySQL’s mysqldump tool? Is it compatible?
Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.Original topic: tidb能用mysqldump工具备份吗
Can TiDB backups be done using MySQL’s mysqldump tool? Is it compatible?
A small amount is fine, but if the volume is slightly larger, consider this:
Logical backup…
Sure, but it’s not necessary. Moreover, TiDB has also modified mysqldump.
https://docs.pingcap.com/zh/tidb/v4.0/mydumper-overview#mydumper-使用文档
TiDB mainly uses Dumpling for backups, which is more convenient.
Later tools are definitely meant to improve upon the original tools.
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.
I don’t think so. TiDB uses SST, while MySQL uses IDB. They can’t be used interchangeably, right?
For large amounts of data, Dumpling works well. For smaller amounts of data, you can also try mysqldump.
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.
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.
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.
There are no issues with dumpling for tables of several terabytes.