Using different formats

pg_basebackup can create various formats. By default, it will put data in an empty directory. Essentially, it will connect to the source server and create a .tar over a network connection and put the data into the desired directory.

The trouble with this approach is that pg_basebackup will create many files, which is not suitable if you want to move the backup to an external backup solution (maybe Tivoli storage manager or some other solution):

-F, --format=p|t output format (plain (default), tar)

To create a single file, you can use the -F=t option. By default, it will create a file called base.tar, which can then be managed more easily. The downside, of course, is that you have to inflate the file again before performing ...

Get Mastering PostgreSQL 10 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.