pg_restore

Restore a PostgreSQL dump

high risk

interactive breakdown — edit the command and press Explain
$ 
⚠ Risks & cautions
Safer / dry-run alternatives
pg_restore -l <dump>Inspect the contents
createdb restore_test && pg_restore -d restore_test <dump>Test restore elsewhere
What it does

Restores archives created by pg_dump -Fc.

Common flags
FlagMeaning
-dTarget database
--clean --cleanDrop objects before recreating⚠ Deletes existing objects.
--no-owner --no-ownerSkip ownership
-jParallel
Examples
pg_restore -d newdb mydb.dumpRestore into a new database · explain & risk-check →
pg_restore --list mydb.dumpList contents · explain & risk-check →
Related
pg_dump psql
Open the full explainer →More in Databases

Reference text is hand-written and may be incomplete — check man pg_restore for your version. Test destructive commands on a non-production system first.