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:
First, we create a Barman backup with the following command:
barman backup primary
In the next step, we examine the list of backups with the following command:
barman list-backup primary
In the third step, we check the metadata of the most recent backup:
barman show-backup primary latest
In the next step, we see all files that were...