Documentation Index
Fetch the complete documentation index at: https://docs.dbdock.xyz/llms.txt
Use this file to discover all available pages before exploring further.
migrate is the main cross-database migration command. DBdock analyzes the source, generates a schema mapping, shows it to you, and waits for confirmation before touching anything.
Run
dbdock analyze on the source first. It’s read-only and tells you what you’re about to migrate.Examples
MongoDB → PostgreSQL
PostgreSQL → MongoDB
Options
| Option | Description |
|---|---|
--dry-run | Run against a temporary schema/collection prefix for validation |
--incremental | Only migrate new/changed data (needs --since) |
--since <date> | Cutoff date for incremental (ISO format) |
--config <path> | Use a saved migration config file |
--export-config <path> | Export the generated plan to a config file |
--batch-size <number> | Documents per batch (default 1000) |
--max-depth <number> | Max nesting depth before jsonb (default 2) |
The confirmation flow
What happens under the hood
Reusing a mapping
Generate and save the plan once:Tuning
Large collections
If a collection has millions of documents, lower the batch size to reduce memory and increase the commit frequency:Deeply nested documents
If your documents have complex nesting you don’t want flattened, increase--max-depth — but past depth 2 or 3, you’re usually better off with jsonb:
jsonb — usually the right default.
See also
Dry runs
Validate before committing.
Schema mapping
Type conversion details.
Incremental
Pull only new/changed data.

