Barman release notes
© Copyright EnterpriseDB UK Limited 2025 - All rights reserved.
3.18.0 (2026-03-12)
Notable changes
-
Add support for incremental backups in cloud storages
Added support for block-level incremental backups in cloud storages, allowing users
to efficiently manage backup storage and reduce costs by only uploading changed data.This new feature relies on streaming native Postgres backups (taken with
pg_basebackup)
to Barman and from Barman directly to a cloud storage dynamically, without ever
storing the full backup in the Barman host, only using a small staging area. The
staging area location and size can be configured via the newcloud_staging_directory
andcloud_staging_max_sizeconfiguration options, respectively.To configure this feature, set
backup_method = postgresandbasebackups_directory
andwals_directoryto a cloud storage URL (e.g.,s3://my-bucket/barman).Example configuration:
[myserver] backup_method = postgres basebackups_directory = s3://my-bucket/barman wals_directory = s3://my-bucket/barman cloud_staging_directory = /tmp/barman/cloud-staging cloud_staging_max_size = 30Gi
The backup structure in the cloud storage follows the same patterns as the current
barman-cloud-* scripts i.e. backup files are archived withtarand live under
directories named after the server name and the backup ID, e.g.
my-bucket/barman/<server_name>/base/<backup_id>/..., while WAL files are
stored in awalssubdirectory under the server directory, i.e.
my-bucket/barman/<server_name>/wals/.... In this sense,basebackups_directory
andwals_directoryact as a prefix for the backup and WAL paths in the cloud
storage. This ensures compatibility with existing backup management practices.Important notes:
- This is an experimental feature, and there are some limitations to be aware of (see
the documentation for details). - Restoring backups taken with this method is currently not supported directly in Barman,
and it's the user's responsibility to perform this manually or through custom
scripts/processes. Restoring such backups will come in a future release. - This is the first step toward unifying the barman cloud experience and simplifying
cloud backup operations, and more features and improvements will be added in
future releases.
References: BAR-928.
- This is an experimental feature, and there are some limitations to be aware of (see
-
Add
local-to-cloudbackup method tobarmanCLIIntroduced support for direct cloud backups through the main
barmanCLI by
adding a newlocal-to-cloudbackup method. Previously, cloud backups were only
available through standalonebarman-cloud-*scripts.With this enhancement, you can now configure cloud backups directly in the barman
configuration file usingbackup_method = local-to-cloudalong with a cloud storage
URL inbasebackups_directory(e.g.,s3://bucket/path). This provides a unified
interface for all backup methods and is the first step toward deprecating the
standalonebarman-cloud-*scripts.The new
CloudBackupExecutorintegrates seamlessly with the existing barman
backup infrastructure, coordinating with PostgreSQL using the low-level backup
API and uploading backups directly to cloud object storage.Example configuration:
[myserver] backup_method = local-to-cloud basebackups_directory = s3://my-bucket/barman/backups conninfo = host=postgres-host dbname=postgres
This is the first step toward unifying the barman cloud experience and simplifying
cloud backup operations.The following configuration options were reused or added to the Barman
configuration to provide feature parity with thebarman-cloudscripts:cloud_upload_min_chunk_sizeaws_regionaws_read_timeoutaws_encryptionaws_sse_kms_key_idbandwidth_limitcloud_delete_batch_sizecloud_upload_max_archive_size
References: BAR-1095, BAR-1116, BAR-1122, BAR-1109, BAR-1120, BAR-1121, BAR-1117, BAR-1112, BAR-1115.
-
Add 'barman cloud-wal-archive' command for local-to-cloud WAL archiving
Introduced a new
barman cloud-wal-archivecommand that enables direct WAL file
archiving from the PostgreSQLpg_waldirectory to cloud object storage when
using the 'local-to-cloud' backup method. This command is designed to be used
as the PostgreSQLarchive_commandwhen the Barman server runs on the same
host as the PostgreSQL instance.WAL files sent to cloud object storage can also be compressed before uploading,
using the existingcompressionandcompression_levelconfiguration options.
Compressed WAL files are stored with the appropriate file extension (e.g.
.gz,.lz4), consistent with the convention already used by
barman-cloud-wal-archive.The following in-memory compression algorithms are supported:
gzip,bzip2,
xz,snappy,zstd, andlz4.pigzandcustomare not supported for
cloud WAL storage because they rely on external processes.Example configuration:
[myserver] backup_method = local-to-cloud archiver = on wals_directory = s3://my-bucket/barman/wals compression = gzip compression_level = 6
References: BAR-1098, BAR-1124.
Minor changes
-
Add
--addressing-styleoption for S3-compatible storage providersA new
--addressing-styleoption is now available for barman-cloud commands
when using AWS S3 or S3-compatible storage providers. This option allows
users to explicitly set the S3 addressing style toauto,virtual, or
path. This is useful when working with S3-compatible storage systems that
require virtual-hosted-style addressing, asboto3automatically defaults
to path-style addressing for non-S3 endpoints.Special thanks to @ChandonPierre who reported and contributed to this feature
in the PR #1134.References: BAR-1011.
-
Add Python 3.14 compatibility support for cloud operations
Added support for Python 3.14 by fixing a breaking change in
functools.partial
that affected cloud backup operations. In this version,functools.partialbecame
a method descriptor which changed its behavior when used as a class attribute.
This update ensures Barman cloud operations continues to work seamlessly
when upgrading to Python 3.14.This patch is based on the original idea by @pvbiesen, who suggested the feature
and contributed in the PR #1143. A similar fix was also suggested by @mjlshen in
PR #1109.References: BAR-1012.
-
Prevent usage of barman-cloud-backup as hook for backups with compression
The usage of
barman-cloud-backupas a hook for backups taken with compression is
now prevented by erroring out with an appropriate message.This change ensures that backups with compression are not inadvertently used with
cloud backup hooks, given that such usage was never supported.The behavior is also documented with a warning note.
References: BAR-1015.
-
Add LZ4 compression support for Barman cloud
Added support for LZ4 compression in
barman-cloud-backupcommand.
You can now specify the --lz4 option to compress backup files using LZ4
compression before uploading to cloud storage. This option is mutually exclusive
with other compression options (--gzip, --bzip2, --snappy), and it requires
thelz4Python library to be installed.This feature was suggested and implemented by @vietcgi in the PR #1144.
References: BAR-1013.
-
Experimental support for WarehousePG database ID configuration
Addition of experimental support for WarehousePG, which includes a new configuration
optionwarehousepg_dbidthat allows users to specify the database ID of the
WarehousePG segment when using the PostgreSQL backup method. This configuration is
intended to enable better integration with WarehousePG for backup and restore
operations.There's also an improvement in the collection of Postgres parameters due to
archive_timeoutnot being exposed inpg_settingson WarehousePG segments.References: BAR-1092.
-
Add custom restore command support for barman recover operations
Added a new
--restore-commandoption to thebarman recovercommand that allows
users to override Barman's default restore command with a custom command. While the
default restore command built by Barman is suitable for most cases, this option
allows you to specify an alternative command if your setup requires it.Previously, users had to manually edit PostgreSQL recovery configuration files after
recovery to change the restore command, which was error-prone and required additional
manual intervention. With this new option, users can now specify a custom restore
command directly through the command line.This enhancement was applied due to an issue reported in #881 by @PaganMuffin.
References: BAR-201.
Bugfixes
-
Fix file handle leak for long-running WAL archiving services
Fixed a resource leak in the cloud WAL archiving functionality where file handles
were not being properly closed after uploading WAL files to cloud storage. This
issue could primarily affect long-running WAL archiving services that process
multiple WAL files in sequence, where the accumulating open file handles could
eventually cause "Too many open files" errors, preventing further WAL archiving
operations.The fix ensures that file handles are properly closed immediately after each
upload operation completes, regardless of whether compression is used and even
when upload failures occur. This prevents handle exhaustion in services that
perform continuous or high-frequency WAL archiving to cloud providers.Special thanks to @ethiebautgeorge-nasuni who contributed to this feature in
the PR #1129.References: BAR-973.