How it works...

Creating a backup is extremely easy. To do so, we merely need to invoke the barman command with the backup parameter and specify primary as the label we want to back up. When activated, Barman contacts the pg-primary server and tells it to enter backup mode. It then retrieves all database files over SSH and saves them in its backup catalog. We can view the contents of the catalog in several ways.

The first way to examine the catalog is using the list-backup parameter. On our test server, we would expect to see output similar to this:

Backups are listed from least to most recent. The first column is the name of the server that ...

Get PostgreSQL High Availability Cookbook - Second 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.