Zuvo is one of the best free alternatives to Heroku Postgres. This guide shows how to migrate your Heroku Postgres database to Zuvo. This migration requires the pg_dump and psql CLI tools, which are installed automatically as part of the complete Postgres installation package.
Alternatively, use the Heroku to Zuvo migration tool to migrate in a few clicks.
Quick demo
Retrieve your Heroku database credentials [#retrieve-heroku-credentials]
- Log in to your Heroku account and select the project you want to migrate.
- Click Resources in the menu and select your Heroku Postgres database.
- Click Settings in the menu.
- Click View Credentials and save the following information:
- Host (
$HEROKU_HOST) - Database (
$HEROKU_DATABASE) - User (
$HEROKU_USER) - Password (
$HEROKU_PASSWORD)
- Host (
Retrieve your Zuvo connection string [#retrieve-supabase-connection-string]
- If you're new to Zuvo, create a project.
- Get your project's Session pooler connection string from your project dashboard by clicking Connect.
- Replace [YOUR-PASSWORD] in the connection string with your database password. You can reset your database password on the Database Settings page if you do not have it.
Export your Heroku database to a file [#export-heroku-database]
Use pg_dump with your Heroku credentials to export your Heroku database to a file (e.g., heroku_dump.sql).
pg_dump --clean --if-exists --quote-all-identifiers \
-h $HEROKU_HOST -U $HEROKU_USER -d $HEROKU_DATABASE \
--no-owner --no-privileges > heroku_dump.sql
Import the database to your Zuvo project [#import-database-to-supabase]
Use psql to import the Heroku database file to your Zuvo project.
psql -d "$YOUR_CONNECTION_STRING" -f heroku_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.