crdb-dump¶
Export and import CockroachDB schemas and data — SQL, JSON, YAML, or chunked CSV.
A feature-rich CLI for dumping and restoring CockroachDB: parallel chunked
exports, manifest checksums, multi-schema (non-public) objects, rich type
support (BYTES/UUID/ARRAY/VECTOR), permissions, resumable imports,
S3-compatible storage, region-aware filtering, and automatic retries.
What crdb-dump is — and isn't
crdb-dump is a logical, point-in-time dump/restore tool. It is not a live-migration tool. For minimal-downtime or continuous migration, use CockroachDB MOLT or Logical Data Replication (LDR). See Migration & Limitations.
Key features¶
Schema export¶
Tables, views, sequences, and enum types in any schema (not just public).
Full-database dumps use native SHOW CREATE ALL TYPES / SHOW CREATE ALL TABLES
— dependency-ordered, with foreign keys validated after load.
Data export¶
CSV or SQL, with chunking, gzip, ordering, parallelism, and per-chunk SHA-256 manifests.
Rich types¶
BYTES, UUID, STRING[]/arrays, TIMESTAMP, enums, and VECTOR all
round-trip in both SQL and CSV.
Resumable imports¶
COPY-based loads with per-chunk resume logs, parallel loading, CSV validation,
and dry runs — restarts are safe and idempotent.
S3-compatible storage¶
Stream chunks to and from AWS S3, MinIO, or Cohesity with custom endpoints.
Region-aware¶
Filter export and import by table locality in multi-region databases.
Quick example¶
export CRDB_URL="cockroachdb://root@localhost:26257/mydb?sslmode=disable"
# Export full schema + chunked CSV data
crdb-dump export --db=mydb --data --data-format=csv --chunk-size=1000
# Restore into a fresh database
crdb-dump load --db=mydb \
--schema=crdb_dump_output/mydb/mydb_schema.sql \
--data-dir=crdb_dump_output/mydb --validate-csv
Get started¶
-
Getting Started
Install crdb-dump and run your first export and restore.
-
Guides
Learn every feature: schema, data, types, S3, regions, and more.
-
Recipes
Task-oriented, copy-paste workflows for common jobs.
-
CLI Reference
Every command and option, generated from the CLI.
Install¶
Requires Python 3.10+.
Community & support¶
- Issues and feature requests: https://github.com/viragtripathi/crdb-dump/issues
- Contributing
- Released under the MIT License