How to export your data from PlanetScale
PlanetScale databases are exported with the official pscale CLI's "database dump" command, which creates a local backup of a branch's schema and data as SQL, JSON (JSONL), or CSV files, optionally limited to specific tables or columns.
✓ Verified against PlanetScale's official documentation, February 2026
Step by step
- 1Install and set up the pscale CLI and authenticate (pscale auth login) or configure a service token, as described in the CLI setup docs.
- 2Identify the database and branch you want to export, e.g. my-database and main.
- 3Run pscale database dump <DATABASE_NAME> <BRANCH_NAME> to create a local dump directory containing the schema and data.
- 4Optionally choose an output format with --output-format=sql (default), --output-format=json, or --output-format=csv.
- 5Optionally limit the export with --tables <TABLES_LIST> for specific tables, or --columns 'table:col1,col2' (repeatable) for specific columns per table.
- 6Optionally set --output <DIRECTORY_NAME> to control where the dump is written (defaults to the current directory) and --threads <N> to control dump parallelism (default 16).
- 7Verify the dump directory contents, then use pscale database restore-dump <DATABASE_NAME> <BRANCH_NAME> --dir <DIRECTORY_NAME> to restore into another PlanetScale Vitess database, or load the SQL/CSV/JSON files into a different MySQL-compatible database.
What the export includes
- ✓Table schema for the selected branch
- ✓Row data for all tables (or only the tables/columns you specify with --tables / --columns)
- ✓Data in your chosen format: MySQL INSERT statements (SQL), JSONL with one JSON object per line (JSON), or CSV with headers (CSV)
What it doesn't include
- ✗Branch/deploy request history, schema change history, and Insights query data (not part of the dump)
- ✗Organization/account settings, service tokens, webhooks, and other workspace configuration
- ✗Postgres/Neki databases are not covered by pscale database dump (Vitess-only feature); Postgres data is exported with standard pg_dump/pg_restore instead
Before you start
- ⚠pscale database dump and restore-dump are Vitess-only; they do not work on PlanetScale Postgres or Neki databases.
- ⚠The --columns flag only filters the data files; the schema dump still contains the complete table definition.
- ⚠--output-format only affects the data files, not the schema file.
- ⚠Default thread count for dump is 16 (restore-dump defaults to 1), which affects how fast large databases export/import.
- ⚠To move a database between PlanetScale organizations, dumping the origin and restoring into a new database is the documented approach (the importer cannot duplicate a database already hosted on PlanetScale).
Where to take your data
Free and cheaper tools that can take a PlanetScale export. See all PlanetScale alternatives →
DigitalOcean Managed MySQL
Load the SQL-format dump with the mysql client against your DigitalOcean MySQL cluster connection string, or restore table-by-table from the CSV files with LOAD DATA.
Railway
Provision a MySQL service on Railway, then import the SQL dump with mysql -h <host> -u <user> -p <database> < dump.sql using the connection details from Railway's variables panel.
Neon
Neon is Postgres-based, so a MySQL SQL/CSV/JSON dump from pscale needs schema translation first (e.g. with pgloader or a manual CSV import via psql \copy) rather than a direct SQL import.
Exporting from PlanetScale: common questions
Can I export my PlanetScale database without the CLI, e.g. from the web dashboard?+
The documented export method is the pscale CLI's database dump command; there is no documented one-click dashboard export button for bulk data.
What format should I use to move data into another MySQL database?+
Use the default SQL format, since it produces MySQL INSERT statements you can load directly with mysql; CSV and JSON are better suited for analysis or custom import pipelines.
Can I export just one table instead of the whole database?+
Yes, pass --tables <TABLES_LIST> to pscale database dump to limit the export to specific tables.
Does PlanetScale export my schema history or branch/deploy request history?+
No. The dump command only exports the current schema and data for the branch you target, not historical schema changes or deploy request records.
Does this work for PlanetScale Postgres?+
No. pscale database dump and restore-dump apply to Vitess databases only; PlanetScale Postgres databases are exported/migrated using standard pg_dump and restored with pg_restore or psql.
Can I exclude sensitive columns from my export?+
Yes, use the --columns 'table:col1,col2' flag (repeatable per table) to export only specific columns, which is useful for leaving out sensitive fields.
Sources
This guide was written from PlanetScale's own documentation and checked against it in February 2026. If a step has changed, the official page wins.
PlanetScale head-to-head
More Dev Tools tools people are leaving
All Dev Tools alternatives →What would you save without PlanetScale?
Pick your team size and see the yearly number.