Skip to main content
You move data into and out of a Sevalla PostgreSQL database with PostgreSQL’s own tools over the database’s external connection: pg_dump to export, pg_restore or psql to import. The same commands move a database from another provider to Sevalla.

Before you begin

  • Create the database on Sevalla first, on the same PostgreSQL major version as the source or a newer one. If the data uses pgvector or PostGIS, turn those extensions on when you create the database: the database user can’t create extensions.
  • Enable the external connection. If IP restrictions are on, allow your IP address.
  • Install the PostgreSQL client tools (pg_dump, pg_restore, psql) at the same major version as the newer of the two servers, or newer: pg_dump refuses to dump a server newer than itself. For a PostgreSQL 17 database, use version 17 or 18. Get them from postgresql.org/download: on macOS brew install postgresql@17, on Debian or Ubuntu the postgresql-client-17 package from the PostgreSQL APT repository, on Windows the EDB installer.
  • Copy the Host, Port, Database, User and Password from the database’s Overview tab, under Connection > External. See Find the connection details.
The examples use the host orders-db-k3j4h.ext.sevalla.app, port 20145, database orders and user orders; replace them with yours. Each command asks for the password. To skip the prompt, set it for the session first:

Export a database

--format=custom writes a compressed archive that pg_restore can restore in parallel. --no-owner and --no-privileges leave out ownership and grants, which refer to roles that don’t exist on the destination. For a plain SQL file you can read, use --format=plain --file=orders.sql instead. To export from another provider before you move to Sevalla, run the same command with that provider’s host, port, user and database.

Import a database

Import into an empty database. Use pg_restore for a custom-format archive and psql for a plain SQL file.
--jobs=4 restores four tables at a time. pg_restore prints errors as it goes and reports how many it ignored at the end.
Check the result by listing the tables:

Restore a dump backup

Databases in OCI locations write their dump backups as gzip-compressed plain SQL made with pg_dump --clean --if-exists --no-owner --no-privileges. Download one and load it into any PostgreSQL database of the same or a newer version:
To restore a Sevalla backup into a Sevalla database, use Restore on the Backups tab instead. See Restore a backup.

Common errors