PostgreSQL Backup and Restore Cheat Sheet/Restore data only from archive

Restore table data without recreating objects.

Section: Selective Backup and Restore

Restore data only from archive

bash
bash
pg_restore -h localhost -U postgres -d appdb --data-only appdb.dump
Explanation

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
List archive contents
Show archive items without restoring.
OpenIn sheetbashsame section
Restore one table
Restore only a named relation from an archive.
OpenIn sheetbashsame section
Restore schema only from archive
Restore DDL only from an archive.
OpenIn sheetbashsame section
Parallel restore
Restore using multiple worker jobs when archive format allows it.
OpenIn sheetbashsame section
Dump one table
Export one table definition and data.
OpenIn sheetbashsame section
Dump one schema
Export one schema from a database.
OpenIn sheetbashsame section