Skip to content
Skip to content
PGB Learn

Import data into a database

Bring a database over from another host, or upload a .sql or .sql.gz dump, from the Backups page.

Updated Nov 12, 2026

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.

  1. Open Backups and find Import from another database.
  2. Pick the source type: Supabase, Neon or Other Postgres. A hint explains where to copy the connection string.
  3. 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.
  4. 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.
  5. 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.
  6. 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.
  7. 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

  1. Under Upload & Restore External SQL Dump, choose Upload & Restore Dump....
  2. Select a .sql or .sql.gz file produced by pg_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

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