Backup and recovery using Barman

Now that we have installed and configured Barman it is now time to use Barman for its actual purpose, that is, taking backups with Barman and recovering PostgreSQL using the backups taken with Barman. This section is divided into two areas, first taking the backup and then testing its recovery.

Getting ready

All the steps in this recipe require Barman to be installed on the backup server. For restoring data we are going to use a new server named pg-clone.

How to do it...

The first part is to take backups, which will be done here. The following steps are all carried out on the backup server:

  1. First, we create a Barman backup with the following command:
            barman backup primary 
    
    
  2. In the next step, we examine the list ...

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