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.
copydb is the “I just need to move this database” command. No config file. No intermediate backup file. Just paste two URLs and go.
Quick example
What it does
- Tests both connections
- Shows source database size and table count
- Warns if the target has existing data
- Asks for confirmation
- Streams
pg_dumpdirectly intopg_restore— no temp files, no waiting
Options
| Option | Description |
|---|---|
--schema-only | Copy tables, indexes, constraints — no data |
--data-only | Copy data only (schema must already exist on target) |
--verbose | Show detailed pg_dump/pg_restore output |
--driver | Use direct PostgreSQL driver instead of pg_dump. Required for serverless/modified Postgres (Neon, Supabase pooler, PlanetScale Postgres, etc.) |
Common use cases
Refresh staging from production
Promote staging to production
Pull production down to local for debugging
Align schema across environments
The --driver flag
Some serverless Postgres services (Neon, Supabase pooler, and others that use modified Postgres) reject pg_dump because it requires specific superuser operations or exact version matches.
If you hit errors like:
--driver flag to use DBdock’s direct Postgres client instead:
Safety
copydb refuses to proceed silently when the target database has data. You’ll see a confirmation prompt listing target size and table count before anything writes.
If you’re scripting this in CI, wrap it with an explicit empty target:
See also
Staging refresh guide
End-to-end workflow for syncing environments.
Cross-database migration
Moving between MongoDB and Postgres.

