Installation
Suggest editsPrerequisites
Postgres backup API must be installed on the same server as Barman.
The Postgres backup API packages depend on the Barman packages so if you are not installing alongside an existing Barman installation then the Barman packages will also be installed.
It is recommended that you follow the Barman documentation to ensure your Barman installation is fully functional before continuing with Postgres backup API.
Available platforms
Postgres backup API packages are available on the following platforms.
Debian/Ubuntu
Supported versions of Debian and Ubuntu are:
- Debian 10 (buster)
- Debian 11 (bullseye)
- Ubuntu 18.04 (bionic)
- Ubuntu 20.04 (focal)
Official Debian packages for Postgres backup API are distributed by EnterpriseDB and made available through the EDB public APT repositories. The required repository can be enabled by following the instructions at that website.
Install pg-backup-api as follows:
RHEL/CentOS
Postgres backup API is supported on RHEL 7 and 8 in addition to binary compatible alternatives such as CentOS and Rocky.
Official RPM packages for Postgres backup API are distributed by EnterpriseDB and made available through the EDB public YUM repositories. The required repository can be enabled by following the instructions at that website.
Note
If you have not already installed Barman, or if the enabled repositories have changed since Barman was installed, you will also need to install the Extra Packages Enterprise Linux (EPEL) repository and the PostgreSQL Global Development Group RPM repository.
Install pg-backup-api as follows:
SLES
Postgres backup API is supported on SLES 15 SP3 and SLES 12 SP5.
Postgres backup API packages for SLES are distributed by EnterpriseDB and made available through the EDB public zypper repositories. The required repository can be enabled by following the instructions at that website.
Note
For SLES 12 only: If you have not already installed Barman then you will need to enable the OpenSUSE python backports repositories as described in the Barman documentation.
Install pg-backup-api as follows:
Post installation steps
Once the packages are installed you can start the pg-backup-api service:
Enable the service so that it is started automatically on reboot:
Postgres backup API is now serving requests on localhost port 7480.
Test everything is ok by making a request to the status
endpoint:
Confirm details of your Barman installation are being reported via the diagnose
endpoint:
You can now query Barman over HTTP, however because Postgres backup API works over plain HTTP it is restricted to serving on localhost only. To securely enable remote access follow the instructions in securing Postgres backup API.
Send a new task to perform a recover by providing metadata like this:
The json payload should look like this:
Congrats! Carry on with Operations for further information about how to create tasks operations with the API.
Could this page be better? Report a problem or suggest an addition!