PostgreSQL 18 · Backup and restore
Restore a custom-format dump
Restore a dump into an existing, empty database.
pg_restore -U postgres -d mydb mydb.dump
Caution: Restoring into a database that already has data can fail or overwrite objects. Restore into a new database first if unsure.
Official PostgreSQL 18 documentation