How it works...

The pg_dump utility produces a single output file. This output file can use the split command to separate the file into multiple pieces, if required.

The pg_dump archive file, also known as custom format, is lightly compressed by default. Compression can be removed or made more aggressive.

Even though, by default, pg_dump writes an SQL script directly to standard output, it is recommended to use the archive file instead, by enabling the custom format through the "-F c" option. As covered later in the chapter, backing up in the form of archive files gives you more flexibility and versatility when restoring. Archive files must be used with a tool called pg_restore.

The pg_dump utility runs by executing SQL statements against ...

Get PostgreSQL Administration Cookbook, 9.5/9.6 Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.