Restore DDL only from an archive.
Section: Selective Backup and Restore
Restore schema only from archive
bash
bash
pg_restore -h localhost -U postgres -d appdb --schema-only appdb.dumpExplanation
See summary for usage details.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Selective Backup and Restore
Restore data only from archive
Restore table data without recreating objects.
Parallel restore
Restore using multiple worker jobs when archive format allows it.