[TiDB Usage Environment] Production Environment / Testing / PoC
[TiDB Version]
[Reproduction Path] What operations were performed that caused the issue
[Encountered Issue: Issue Phenomenon and Impact]
[Resource Configuration] Enter TiDB Dashboard - Cluster Info - Hosts and take a screenshot of this page
[Attachments: Screenshots/Logs/Monitoring]
Can mysqldump export SQL to SQL and then put it on S3?
Is there a similar tool or built-in command in TiDB?
I want to do a backup. Is logical backup or physical backup recommended?
mysqldump can’t directly export to S3, but you can use dumpling to export as CSV and push to S3 with the -o parameter.
As for logical backup or physical backup, it depends on the size of your data. If the data volume is large, use BR; if it’s small, use dumpling.
The dumpling tool can export to SQL or CSV and natively supports S3 storage. The BR tool can also perform backups, but the BR backup output is in SST files, which are not human-readable. It also supports backup to S3. It is recommended to use the dumpling tool for small data volumes, as it provides logical backups that are readable. For large data volumes, use BR for backups, as it is much more efficient than dumpling.
Using the data export tool Dumpling, you can export data stored in TiDB or MySQL into SQL or CSV formats for logical full backups. Dumpling also supports exporting data to Amazon S3.
Backups include logical backups (dumpling) and physical backups (br). Logical backups export a bunch of SQL-related files and cannot perform incremental recovery, while physical backups can perform incremental recovery. Logical backups are relatively flexible but slower, whereas br is considered hot backup and generally faster for full database backups in larger databases compared to dumpling.
If you need to back up, you can use the BR physical backup tool or the logical backup tool dumpling.
If the data volume is not large, for example, if the table has less than ten million rows, you can consider logical backup; if the data volume is very large, with hundreds of millions of rows or TB level, it is recommended to use physical backup.
The dumpling tool can export to SQL or CSV and natively supports S3 storage, which is a logical backup. The br tool can also perform backups, but the br backup is in SST files, which are not human-readable. It also supports backup to S3 and is considered a physical backup.