Skip to main content
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

  1. Tests both connections
  2. Shows source database size and table count
  3. Warns if the target has existing data
  4. Asks for confirmation
  5. Streams pg_dump directly into pg_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:
or
…use the --driver flag to use DBDock’s direct Postgres client instead:
The driver mode does not support all pg_dump features (e.g., function/procedure bodies for non-PL/pgSQL languages). Use pg_dump mode when possible.

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.