.sql, .sql.gz, .dump and .backup files with
409 CUSTOM_RESTORE_UPLOAD_DISABLED; see
Customer restore upload unavailable.
Instead, run the import yourself with standard PostgreSQL tools.
1. Prepare
- Use the owner role’s credentials from the database page. On a single-login database, use that login. Runtime and read-only roles cannot create tables.
- Take an on-demand backup of the target first, so you can go back.
- Review the dump. It runs with your owner’s privileges, and anything that
needs superuser (for example
CREATE ROLE,ALTER SYSTEMor unsupported extensions) will fail. - Use the TLS settings for your client;
use
sslmode=verify-full.
2. Import
Plain SQL (.sql):
.sql.gz): decompress first, or stream it:
.dump, or .backup in PostgreSQL custom format):
--no-owner makes your owner role own every restored object, and
--no-privileges skips grants to roles that do not exist on DBHost.
PGSSLROOTCERT=system needs libpq 16 or newer; with an older client, point it
at your system CA bundle.
When you create the dump on the source server, pg_dump --no-owner --no-acl
avoids most ownership and grant errors up front.
3. Fix grants and ownership
- Grant your runtime, read-only and additional roles access to the imported tables if they need it.
- If your app gets
permission denied for table ...after an import, run repair ownership ordbhost databases repair-ownership <database-id>to give the owner role ownership of every table, sequence and view.