Barman 2.10 released

3 minute read

5 December 2019: 2ndQuadrant is proud to announce the release of Barman version 2.10, a Backup and Recovery Manager for PostgreSQL.

This minor release introduces verification of the PostgreSQL instance's system identifier in the check command, in order to prevent users from executing commands in Barman when there is an inconsistency between the situation on disk and the live information coming from the PostgreSQL connection(s). Barman will prevent users from taking a backup or archiving a WAL file on an existing folder that contains data from another instance with a different identifier.

Barman 2.10 automates recovery of .partial WAL files coming from streaming replication, making RPO=0 easier to achieve, with barman-wal-restore (in barman-cli package) and get-wal commands.

A new server/global option called create_slot controls automated creation of the replication slot, where required (streaming_archiver must be enabled, and slot_name defined). If set to auto, Barman automatically creates the slot_name replication slot in PostgreSQL. By default, this option is set to manual for back-compatibility.

Barman 2.10 brings two new utilities to the barman-cli package:

  • barman-cloud-wal-archive: script to be used as archive_command in PostgreSQL to directly ship WAL files to AWS S3 for permanent storage in the cloud;
  • barman-cloud-backup: script to be used to perform full base backups from the PostgreSQL server in tar format and to ship them directly to AWS S3 for permanent storage in the cloud.

Both utilities rely on the boto3 Python library. The equivalent restore commands to these will be added in a future release. Until then, restoration is manual - for example you can make use of the AWS client to retrieve files from S3 buckets.

The barman-cli package, which contains "Barman Client Utilities", is recommended on those servers where PostgreSQL instances are running.

Minor bugs have also been fixed.

For a complete list of changes, please refer to the release notes for version 2.10.

Release notes

  • Pull .partial WAL files with get-wal and barman-wal-restore, allowing restore_command in a recovery scenario to fetch a partial WAL file's content from the Barman server. This feature simplifies and enhances RPO=0 recovery operations.

  • Store the PostgreSQL system identifier in the server directory and inside the backup information file. Improve check command to verify the consistency of the system identifier with active connections (standard and replication) and data on disk.

  • A new script called barman-cloud-wal-archive has been added to the barman-cli package to directly ship WAL files from PostgreSQL (using archive_command) to cloud object storage services that are compatible with AWS S3. It supports encryption and compression.

  • A new script called barman-cloud-backup has been added to the barman-cli package to directly ship base backups from a local PostgreSQL server to cloud object storage services that are compatible with AWS S3. It supports encryption, parallel upload, compression.

  • Automated creation of replication slots through the server/global option create_slot. When set to auto, Barman creates the replication slot, in case streaming_archiver is enabled and slot_name is defined. The default value is manual for back-compatibility.

  • Add '-w/--wait' option to backup command, making Barman wait for all required WAL files to be archived before considering the backup completed. Add also the --wait-timeout option (default 0, no timeout).

  • Redact passwords from Barman output, in particular from barman diagnose (InfoSec)

  • Improve robustness of receive-wal --reset command, by verifying that the last partial file is aligned with the current location or, if present, with replication slot's.

  • Documentation improvements

  • Bug fixes:

    • Wrong string matching operation when excluding tablespaces inside PGDATA (GH-245)
    • Minor fixes in WAL delete hook scripts (GH-240)
    • Fix PostgreSQL connection aliveness check (GH-239)

Download