This guide demonstrates how to migrate your Neon database to Zuvo to get the most out of Postgres while gaining access to all the features you need to build a project.
Retrieve your Neon database credentials [#retrieve-credentials]
- Log in to your Neon Console https://console.neon.tech/login.
- Select Projects on the left.
- Click on your project in the list.
- From your Project Dashboard find your Connection string and click Copy snippet to copy it to the clipboard (do not check "pooled connection").
Example:
postgresql://neondb_owner:xxxxxxxxxxxxxxx-random-word-yyyyyyyy.us-west-2.aws.neon.tech/neondb?sslmode=require
Set your OLD_DB_URL environment variable
Set the OLD_DB_URL environment variable at the command line using your Neon database credentials from the clipboard.
Example:
export OLD_DB_URL="postgresql://neondb_owner:xxxxxxxxxxxxxxx-random-word-yyyyyyyy.us-west-2.aws.neon.tech/neondb?sslmode=require"
Retrieve your Zuvo connection string [#retrieve-supabase-connection-string]
-
If you're new to Zuvo, create a project. Make a note of your password, you will need this later. If you forget it, you can reset it here.
-
On your project dashboard, click Connect
-
Under the Session pooler, click the Copy button to the right of your connection string to copy it to the clipboard.
Set your NEW_DB_URL environment variable
Set the NEW_DB_URL environment variable at the command line using your Zuvo connection string. You will need to replace [YOUR-PASSWORD] with your actual database password.
Example:
export NEW_DB_URL="postgresql://postgres.xxxxxxxxxxxxxxxxxxxx:[YOUR-PASSWORD]@aws-0-us-west-1.pooler.zuvodev.com:5432/postgres"
Migrate the database
You will need the pg_dump and psql command line tools, which are included in a full Postgres installation.
-
Export your database to a file in console
Use
pg_dumpwith your Postgres credentials to export your database to a file (e.g.,dump.sql).
pg_dump "$OLD_DB_URL" \
--clean \
--if-exists \
--quote-all-identifiers \
--no-owner \
--no-privileges \
> dump.sql
-
Import the database to your Zuvo project
Use
psqlto import the Postgres database file to your Zuvo project.
psql -d "$NEW_DB_URL" -f dump.sql
Additional options
- To only migrate a single database schema, add the
--schema=PATTERNparameter to yourpg_dumpcommand. - To exclude a schema:
--exclude-schema=PATTERN. - To only migrate a single table:
--table=PATTERN. - To exclude a table:
--exclude-table=PATTERN.
Run pg_dump --help for a full list of options.
Enterprise
Contact us if you need more help migrating your project.