Backup and Recovery: Single-Server Streaming - Installing and Configuring Barman
Suggest editsIn the previous step, we configured the PostgreSQL server, creating users for Barman to connect and manage backups. In this step, we'll install and configure Barman on the backup server.
This demo is interactive
You can follow along right in your browser. When you click "Start Now," Katacoda will load a Docker Compose
environment with two container images representing a PostgreSQL 13 server with
the Pagila database loaded (named pg
)
and a backup server for Barman (named backup
).
Once you see a root@backup
prompt, you can follow the steps below.
This demonstration uses an Ubuntu environment, so the first step is to configure the PostgreSQL repository (details are on the PostgreSQL wiki)
Install prerequesite software
Add PostgreSQL's authentication key
Add the PostgreSQL repository to the list of sources, and update available packages
With the repository configured, we can use apt to install Barman and its dependencies:
Further reading
For more details on installation (including instructions for other supported operating systems), see the Installation section in the Barman guide.
Configuration
All the important details for a Barman server go into a server configuration file, by default located in /etc/barman.d
. These are in the classic INI format, with relevant settings in a section named after the server we're going to back up. We'll also use that name for the configuration file itself. Since the server we intend to back up is named "pg", we'll use that: