pg_dump
Last updated
Was this helpful?
Last updated
Was this helpful?
is a standard utility for backing up a PostgreSQL database.
It makes consistent backups even if the database is being used concurrently. pg_dump
only dumps a single database. To back up an entire cluster, or to back up global objects that are common to all databases in a cluster, use pg_dumpall
Dumps can be output in SQL script or archive file formats. Script dumps are plain-text files containing SQL commands required to reconstruct the database to the state it was in at the time pg_dump
was called.
You can compress your dump using pipe gzip
To restore a database feed the dump file.
Or, if you use a compressed dump
The alternative archive file formats to restore the database.