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
IMPORT INTO or COPY FROM.cockroach import command imports a database or table from a local dump file into a running cluster. This command uploads a userfile, imports its data, then deletes the userfile. PGDUMP and MYSQLDUMP file formats are currently supported.
Required privileges
The user must haveCREATE privileges on defaultdb.
Synopsis
Import a database: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 aPGDUMP file that contains unsupported SQL syntax and log the ignored statements to a userfile:

