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
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.

