Skip to main content
The statements on this page are deprecated as of v23.1 and will be removed in a future release. To move data into CockroachDB, use or .
The cockroach import imports a database or table from a local dump file into a running cluster. This command , imports its data, then . PGDUMP and MYSQLDUMP file formats are currently supported.

Required privileges

The user must have CREATE on defaultdb.

Synopsis

Import a database:
Import a table:
View help:

Supported Formats

Flags

Examples

Import a database

To import a database from a local file:

Import a table

To import a table from a local file:

Import a database with unsupported SQL syntax and log all unsupported statements

To import a database from a PGDUMP file that contains unsupported SQL syntax and log the ignored statements to a :

Import a limited number of rows from a dump file

To limit the number of rows imported from a dump file:

See also