A CLI tool to migrate between PostgreSQL databases.
[!NOTE]
This project is in the Experimental Stage.This project is in an experimental phase to set clear expectations for your usage. There could be known or unknown bugs, the API could evolve. While we cannot provide professional support for experimental projects, we’d be happy to hear from you if you see value in this project!
npx @neondatabase/migrate-pg --silent false --accept-all false --source="pg-string" --destination="pg-string"
-
--source <source>
: The connection string for the source PostgreSQL database. This is a required option.- Example:
--source "postgres://user:password@localhost:5432/source_db"
- Example:
-
--destination <destination>
: The connection string for the destination PostgreSQL database. This is a required option.- Example:
--destination "postgres://user:password@localhost:5432/destination_db"
- Example:
-
--silent
: Suppresses console output if set totrue
. The default value isfalse
.- Example:
--silent true
- Example:
-
--accept-all
: Automatically accepts all prompts if set totrue
. The default value isfalse
.- Example:
--accept-all true
- Example:
- Make sure to enable autoscaling and increase your maximum Compute Unit size during the migration process so that the destination instance has enough CPU and RAM to support the migration.
- The following things can result in error during a migration process:
-
ALTER OWNER
commands -
CREATE EVENT TRIGGER
commands - Anything that requires superuser that's not included in
neon_superuser
role
-
This library is created by Neon with contributions from:
- Rishi Raj Jain (@rishi_raj_jain_)
We love our contributors! Here's how you can contribute:
- Open an issue if you believe you've encountered a bug.
- Make a pull request to add new features/make quality-of-life improvements/fix bugs.