Installing#
Barman official packages are provided by PGDG. These packages use the default version of Python 3 that comes with the operating system.
There are three packages that make up the suite of Barman features: barman,
barman-cli and barman-cli-cloud.
barmanis the main package and it must be installed.barman-cliis an optional package that holds thebarman-wal-restoreandbarman-wal-archiveutilites. This package is mandatory if you plan to use those utilities as thearchive_commandorrestore_command. It must be installed on each Postgres server that is part of the Barman cluster.barman-cli-cloudis an optional package that holds thebarman-cloud-*client scripts that you can use to manage backups in a cloud provider. It must be installed on the Postgres servers that you want to back up directly to a cloud provider, bypassing Barman.
Note
Barman packages can be found in several different repositories. We recommend using PGDG repositories because it ensures compatibility, stability and access to the latest updates.
Warning
Do not upgrade Barman using different repositories. By doing so you risk losing your configuration as each source repository provides different packages, which use different configuration layouts.
System requirements#
The minimal system requirements needed to run a Barman server are the following:
Linux operating system (Debian, Ubuntu, RHEL, Rocky, Fedora, etc.) or UNIX-like operating system (FreeBSD, OpenBSD, etc.)
Python 3.8 or higher
Python modules:
psycopg2>= 2.4.2: Required to connect to the Postgres serverpython-dateutilsetuptoolsargcomplete(optional)
PostgreSQL client tools: Required to interact with the Postgres server
PostgreSQL server >= 13
rsync>= 3.1.0: Required for recovery and Rsync backupsboto3>= 1.29.1: Required when usingbackup_method = snapshottogether with the snapshot lock feature on AWSfilePOSIX command, generally provided by thefilepackage
Deprecated since version 3.14: Support for versions 3.6 and 3.7 of Python has been deprecated. It is known that Barman 3.14 does not work with Python 3.6. It may work with Python 3.7, but it’s not being tested, nor supported for versions of Python prior to 3.8.
Note
Users of RedHat Enterprise Linux, RockyLinux and AlmaLinux are required to install the Extra Packages Enterprise Linux (EPEL) repository <https://fedoraproject.org/wiki/EPEL>
RHEL-based distributions#
You can install barman, barman-cli and barman-cli-cloud using RPM
packages on RHEL systems as well as on similar RHEL-based systems like
AlmaLinux, Oracle Linux and Rocky Linux.
To begin with the installation, first install the PGDG RPM repository.
Important
The barman-cli-cloud scripts are part of the barman-cli package for
RHEL-based distributions from PGDG. Therefore, you only need to install
barman-cli to use the cloud scripts.
barman#
To install the barman package. Run as root:
dnf install barman
barman-cli#
To install the barman-cli package, run as root in the Postgres server:
dnf install barman-cli
Note
If you want to use the barman-cloud utilities as
hook scripts, you
will need to install the barman-cli package in the Barman server.
Debian-based distributions#
You can install barman, barman-cli and barman-cli-cloud using DEB packages
on Debian systems as well as on Debian-based systems like Ubuntu.
To begin with the installation, install the PGDG APT repository. This depends on your system:
For Debian: PGDG Debian repository.
For Ubuntu: PGDG Ubuntu repository.
Important
The barman-cli-cloud package is included among the recommended packages when you
install barman-cli.
Before starting the installation, it’s essential to evaluate your use case. If you
don’t plan to use the barman-cloud client scripts, such as barman-cloud-backup,
you can skip installing barman-cli-cloud as a recommended package when
installing barman-cli. However, if you only intend to use the barman-cloud client
scripts, you can install the barman-cli-cloud package on its own.
barman#
To install the barman package. Run as root:
apt install barman
barman-cli#
To install the barman-cli package, run as root in the Postgres server:
apt install barman-cli
barman-cli-cloud#
To install the barman-cli-cloud package, run as root in the Postgres server:
apt install barman-cli-cloud
Note
If you want to use the barman-cloud utilities as hook scripts, you will need to install this package in the Barman server.
SLES-based distributions#
You can install barman on SLES systems by utilizing the packages provided in
the PostgreSQL Zypper Repository.
To begin installation, you will need to add the appropriate repository by following the detailed instructions available on the PGDG SLES Repository Configuration.
The current supported version for installation is SLES 15 SP6.
Important
The barman-cli-cloud utilities are part of the barman-cli package for
SLES-based distributions from PGDG. Therefore, you only need to install
barman-cli to use the cloud scripts.
barman#
To install the barman package. Run as root:
zypper install barman
barman-cli#
To install the barman-cli package, run as root in the Postgres server:
zypper install barman-cli
Note
If you want to use the barman-cloud utilities as hook scripts, you will need to install this package in the Barman server.