pg_restore -d mydb mydb.dump

Category: Databases & SQL

pg_restore -d mydb mydb.dump

Restore a custom-format backup into a database

Loads the archive created by pg_dump -Fc into the mydb database. Create mydb with createdb first — pg_restore does not create the target by default (use -C to make it). Related: pg_restore --list to inspect the archive.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.