Export Data from TiDB
This page describes how to export data from your cluster in TiDB Cloud.
TiDB does not lock in your data. Sometimes you still want to be able to migrate data from TiDB to other data platforms. Because TiDB is highly compatible with MySQL, any export tool suitable for MySQL can also be used for TiDB.
You can use the tool Dumpling for data export.
Download and install TiUP:
curl --proto '=https' --tlsv1.2 -sSf https://tiup-mirrors.pingcap.com/install.sh | shDeclare the global environment variable:
source .bash_profileInstall Dumpling.
tiup install dumplingExport your data using Dumpling from TiDB.
tiup dumpling -h ${tidb-endpoint} -P 3306 -u ${user} -F 67108864 -t 4 -o /path/to/export/dirIf you want to export only the specified databases, use
-Bto specify a comma separated list of database names.The minimum permissions required are as follows:
SELECTRELOADLOCK TABLESREPLICATION CLIENT
Currently, Dumpling only supports the Mydumper format output, which can be easily restored into MySQL compatible databases by using TiDB Lightning.