Our first step is to install Barman itself. As this book focuses on Red Hat-based and Debian-based Linux systems, this process is very simple. Barman is available in the PostgreSQL repositories for either platform, making the first step the easiest. Unfortunately, we have quite a few more steps to complete.
For Barman to work properly, it must be able to retrieve PostgreSQL files from the pg-primary server. To facilitate this, we generate an SSH key on pg-backup with ssh-keygen. We set the key type to RSA with the -t parameter and set the pass-phrase to a blank value with -N. This allows Barman to communicate with the pg-primary system without a password, yet do so securely. The ssh-copy-id command sends the public key to ...