Section: Selective Backup and Restore

Dump one table

bash
bash
pg_dump -h localhost -U postgres -d appdb -t public.users -f users.sql
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
Dump one schema
Export one schema from a database.
OpenIn sheetbashsame section
Restore one table
Restore only a named relation from an archive.
OpenIn sheetbashsame section
List archive contents
Show archive items without restoring.
OpenIn sheetbashsame section
Restore schema only from archive
Restore DDL only from an archive.
OpenIn sheetbashsame section
Restore data only from archive
Restore table data without recreating objects.
OpenIn sheetbashsame section
Parallel restore
Restore using multiple worker jobs when archive format allows it.
OpenIn sheetbashsame section