Import data into a database
Bring a database over from another host, or upload a .sql or .sql.gz dump, from the Backups page.
There are two ways to get existing data in. Both live on Databases > Backups.
Import from another database
Use this to move from another Postgres host. It copies tables and data live, and checks the result.
- Open Backups and find Import from another database.
- Pick the source type: Supabase, Neon or Other Postgres. A hint explains where to copy the connection string.
- Paste the Connection string (
postgresql://user:password@host:5432/database). The source must be reachable from the internet and the user needs read access to the tables you want. - Choose Check source. Nothing is copied at this stage. The check is read-only, the string is used only for this import and never saved.
- Review the plan: what was found, which schemas will be imported (untick any you do not want), schemas left behind because they belong to the other platform, and extensions that will be installed. If the source uses extensions PGBHub does not support, or is larger than the import limit, the page says so and you cannot continue.
- If the target database already has data, the page warns that importing will permanently replace it. You must type the database name to confirm and choose I understand the consequences, replace and import. Replacing needs an Owner or Admin role; filling an empty database needs write access.
- Watch the progress bar. When finished, the history shows tables and row counts.
The import runs as one transaction and verifies row counts, so a failed or short import changes nothing.
Upload a SQL dump
- Under Upload & Restore External SQL Dump, choose Upload & Restore Dump....
- Select a
.sqlor.sql.gzfile produced bypg_dump. Progress shows upload, execution and verification.
Dumps are checked before running: psql meta-commands are refused. You need a role that can write data.
Before you import
- Take a snapshot of the target first. See Restore, download and import backups.
- Enable the extensions your schema uses. See Extensions.
- After import, run the Query Advisor. See Query Advisor and performance.
Good to know
- There is a maximum source size; if yours is larger, contact support for a bigger import.
- Features of the other platform (its own auth, storage and queue schemas) are not carried over; the page lists what was skipped.
- Update your app's connection string only after you verify the data. See Connection strings.
More guides in Console: databases
Create a database
Add a PostgreSQL database to a project, choose its version and extensions, and manage several databases in one project.
Connection strings, direct and pooled connections
Find your host, port and credentials, choose between the pooled, regular and direct connection, and test that they work.
Your database's own address
Use the per-database address shown on the Connection page, what is faster about it, and how to rename it safely.
The SQL editor
Run queries and scripts against your database from the Console, use templates and history, and understand the safety limits.
Extensions
See which PostgreSQL extensions are available for your database, enable or disable them and understand "needs approval".
PostgreSQL versions and upgrades
Choose a version when you create a database and upgrade to a newer one from DB Settings, with a verified copy.