Export with Dumpling
Dumpling is the recommended tool for exporting large datasets. It exports data as SQL dump files or CSV.Dumpling options
Export with SELECT INTO OUTFILE
For small exports from within a SQL session:SELECT INTO OUTFILE writes to the TiDB server’s local filesystem. For large datasets, use Dumpling instead.
Import with TiDB Lightning
TiDB Lightning is the fastest way to import large datasets into TiDB.Import with LOAD DATA
For smaller CSV files, use LOAD DATA directly in SQL:The LOCAL keyword reads from the client machine. Without LOCAL, it reads from the TiDB server’s filesystem.
Import from S3 or GCS
TiDB supports importing directly from cloud storage:Or with TiDB Lightning pointing to cloud storage: