p:: PostgreSQL f:: pg_restore
pg_dump
is a utility for backing up a PostgreSQL database. It makes consistent backups even if the database is being used concurrently. pg_dump
does not block other users accessing the database (readers or writers). Dumps can be output in script or archive file formats.
...
-F format
--format=format
Selects the format of the output. format can be one of the following:
p
plain
Output a plain-text SQL script file (the default).
c
custom
Output a custom-format archive suitable for input into pg_restore. Together with the directory output format, this is the most flexible output format in that it allows manual selection and reordering of archived items during restore. This format
is also compressed by default.
d
directory
Output a directory-format archive suitable for input into pg_restore. This will create a directory with one file for each table and blob being dumped, plus a so-called Table of Contents file describing the dumped objects in a machine-readable
format that pg_restore can read. A directory format archive can be manipulated with standard Unix tools; for example, files in an uncompressed archive can be compressed with the gzip tool. This format is compressed by default and also supports
parallel dumps.
t
tar
Output a tar-format archive suitable for input into pg_restore. The tar format is compatible with the directory format: extracting a tar-format archive produces a valid directory-format archive. However, the tar format does not support
compression. Also, when using tar format the relative order of table data items cannot be changed during restore.
...