CertGrid CertGrid
Troubleshooting·PostgreSQL

PostgreSQL Custom Format Dumps and Selective Restore

A custom-format dump carries a table of contents, so you can restore one table out of it. Doing that here **fails** - because filtering to a table does not bring its schema along, and pg_restore will not create what you filtered out.

Backup and Restore Guide 23 of 47 Intermediate

Written against the versions above. Custom format is compressed and indexable. It is the format to use for anything you might restore selectively, which is most things.

Every command on this page ran on db-a01.
Server NameIP AddressOSRolesCPURAMHDD
db-a01192.168.0.81Ubuntu 26.04 LTSPrimary / Source / Replica Set Member 12 Core4 GB50 GB

Before you start

  1. Dump in custom format and read its table of contents

  2. Restore one table, and watch it fail

  3. Create the dependency, then restore

Official sources