Local databases and files
Tested with: zb migrate 0.1 · pg_dump 17 · mysqldump 8.4 · valkey-cli 8.1 · mongodump 100.10 · sqlite3 3.46 · duckdb 1.3
--from local runs the engine’s own dump tool on your machine and streams it to a pre-signed upload URL; a file
path uploads the file as-is. Nothing needs to be reachable from the internet.
# Local server (uses PG* env vars or --host/--port/--user)zb migrate --from local --engine postgres --db myapp --create
# Existing dump (custom or plain format, optionally gzipped)pg_dump -Fc myapp > myapp.dumpzb migrate --from ./myapp.dump --engine postgres --createzb migrate --from ./myapp.sql.gz --engine postgres --to inst_abczb migrate --from local --engine mysql --db myapp --create
mysqldump --single-transaction --routines --triggers --set-gtid-purged=OFF myapp | gzip > myapp.sql.gzzb migrate --from ./myapp.sql.gz --engine mysql --createzb migrate --from local --engine valkey --create # runs valkey-cli --rdb against localhost:6379
valkey-cli --rdb dump.rdb # or an existing RDB snapshotzb migrate --from ./dump.rdb --engine valkey --createzb migrate --from local --engine ferretdb --db myapp --create # runs mongodump
mongodump --db myapp --archive=myapp.bson.tarzb migrate --from ./myapp.bson.tar --engine ferretdb --createzb migrate --from ./app.sqlite --engine libsql --createzb migrate --from ./app.db --engine libsql --to inst_abc --drop-targetWAL-mode databases are checkpointed on upload; keep the -wal file next to the database until the upload is done.
zb migrate --from ./analytics.duckdb --engine duckdb --create --size s1zb migrate --from ./events.csv --engine duckdb --include events --to inst_abczb migrate --from ./orders.parquet --engine clickhouse --include orders --to inst_abczb migrate --from ./metrics.csv --engine questdb --include metrics --to inst_abcCSV and Parquet files load into one table, named with --include. DuckDB takes .duckdb files and CSV; for
Parquet, load it into a .duckdb file first (duckdb app.duckdb -c "CREATE TABLE t AS FROM 'file.parquet'").
QuestDB takes CSV only. See DuckDB, ClickHouse and
QuestDB.
If the target engine is not orderable yet (its engine page shows the status), the file formats are accepted now and queued until it is.
Size limits and resumable uploads
Section titled “Size limits and resumable uploads”Uploads are S3 multipart with resume: an interrupted zb migrate continues where it stopped. Files up to the
target size’s storage ceiling are accepted; --create picks a size whose ceiling fits the file with 30% headroom.