Debian Codegraph @

RELNOTES.md

raw
1 # Barman release notes
2
3 © Copyright EnterpriseDB UK Limited 2024-2026 - All rights reserved.
4
5 ## 3.20.1 (2026-09-29)
6
7 ### Bugfixes
8
9 - Fix CVE-2026-93853 - privilege escalation issue that could delete unrelated cloud snapshots
10
11 Before deleting a snapshot-based backup, Barman now checks, using
12 metadata read directly from the cloud provider rather than from the
13 backup catalog, that the snapshot's name (or, for AWS, its `Name` tag)
14 matches the naming convention Barman uses for the backup being
15 deleted. If it doesn't match, deletion is refused and an error is
16 raised instead. A snapshot that cannot be found at all is treated as
17 already deleted, with no error raised.
18
19 Previously, Barman trusted the snapshot identifiers recorded in the
20 backup catalog (`backup.info`) without further verification. On AWS,
21 Azure and Google Cloud alike, anyone able to overwrite that catalog
22 object could cause Barman to delete unrelated cloud snapshots --
23 including snapshots outside the backup being removed -- using
24 Barman's own cloud credentials on the next retention run or manual
25 deletion.
26
27 This is a privilege escalation risk specifically where the principal
28 able to write the backup catalog is more restricted than Barman's own
29 cloud identity (for example, a separate upload or CI principal without
30 snapshot-delete permissions), the kind of least-privilege setup that
31 is recommended. Deployments using a single, shared identity for both
32 are not granted a new capability by this issue, but upgrading is still
33 recommended.
34
35 CVE ID: CVE-2026-93853
36
37 References: BAR-1608.
38
39 - Fix GCS multipart backup uploads ignoring `STORAGE_EMULATOR_HOST`
40
41 The multipart upload support added for Google Cloud Storage in 3.20.0
42 only accounted for a custom `GOOGLE_CLOUD_UNIVERSE_DOMAIN`, ignoring
43 `STORAGE_EMULATOR_HOST` and other endpoint overrides such as
44 `API_ENDPOINT_OVERRIDE`. As a result, `barman-cloud-backup` against a
45 GCS-compatible emulator failed, even though every other GCS operation
46 correctly honored the emulator. The multipart upload URL is now
47 resolved the same way as every other request made by the GCS client,
48 so it respects the configured endpoint.
49
50 References: BAR-1621.
51
52 - Fix `barman-cloud-wal-restore` serving an incomplete WAL, or crashing, when both the complete and `.partial` versions exist
53
54 When cloud storage held both a complete WAL file and its `.partial`
55 counterpart for the same segment (it happens only with CloudNativePG),
56 `barman-cloud-wal-restore` could result in the incomplete `.partial` file being
57 restored instead of the complete WAL.
58
59 Also, even when `parallel` was unused, Barman would still attempt to create a spool
60 directory, which could fail on a read-only filesystem or in the lack of the
61 necessary permissions.
62
63 The complete WAL is now always preferred over its `.partial` counterpart when both
64 are present and no attempt is made to create a spool directory unnecessarily.
65
66 NOTE: This behavior is specific to CloudNativePG and does not apply to other cloud
67 storage setups.
68
69 References: BAR-1620.
70
71 - Fix Azure disk snapshot creation with recent versions of the Azure SDK
72
73 Creating Azure snapshots backups could fail with recent versions of the
74 `azure-mgmt-compute` SDK (>= 38.0), which changed its API interface.
75 This issue has been addressed to ensure compatibility with the updated SDK.
76 Please update your `azure-mgmt-compute` lib to a version >= 38.0 for this release.
77
78 References: BAR-1619.
79
80 - Fix `barman-cloud-backup-delete` crashing when deleting GCP snapshot backups
81
82 `barman-cloud-backup-delete` could crash with an `AttributeError` when
83 deleting a snapshot backup taken with `--cloud-provider google-cloud-storage`.
84 This issue is now fixed.
85
86 References: BAR-1624.
87
88 ## 3.20.0 (2026-08-27)
89
90 ### Notable changes
91
92 - Barman now requires Python 3.12 or later
93
94 The minimum supported Python version has been raised to 3.12. Installations
95 running on Python 3.8, 3.9, 3.10, or 3.11 must upgrade their Python
96 interpreter before upgrading Barman.
97
98 References: BAR-1332.
99
100 - Add support for AWS S3 SSE-C (Server-Side Encryption with Customer Keys)
101
102 Barman now supports SSE-C (Server-Side Encryption with Customer-Provided Keys)
103 for AWS S3. The `--sse-customer-key` option is available across all backup, restore,
104 and WAL management `barman-cloud-*` commands. The key is supplied as a `file://` URI
105 pointing to a file containing a base64-encoded 256-bit (32-byte) key
106 (e.g. `file:///etc/barman/sse-c.b64`). SSE-C cannot be used together with
107 `--encryption` or `--sse-kms-key-id`. The equivalent server configuration parameter
108 `aws_sse_customer_key` is also supported when using `backup_method = local-to-cloud`
109 or `postgres` with cloud destination directories.
110
111 All backups and WAL files for a given server must be encrypted with the same SSE-C
112 key. Mixing SSE-C-encrypted and unencrypted objects, or using different keys, will
113 cause commands to fail.
114
115 References: BAR-1006.
116
117 - Stop WAL receiver on inactive servers through `barman cron`
118
119 When a server is switched to `active = false`, the next run of
120 `barman cron` now stops any background `receive-wal` subprocess that
121 is still streaming for that server, and skips all other cron work.
122 Previously inactive servers were silently filtered out at the cron
123 level, which meant a receiver spawned while the server was active
124 kept running indefinitely until it was stopped manually.
125
126 Note however that, while the server remains inactive, the upstream
127 Postgres server will retain WAL on its side for the still-existing slot,
128 so on re-enabling the Barman server the next cron run will resume streaming
129 from where the slot left off.
130
131 References: BAR-1139.
132
133 - Make command handling consistent for inactive servers
134
135 Inactive servers (configured with `active = false`) are Barman instances
136 that no longer actively manage backups, but their existing catalogs remain
137 fully accessible for inspection, verification, and maintenance.
138
139 The behavior of Barman commands has been made consistent with this principle.
140
141 Now the following commands work on inactive servers: read-only commands for
142 inspection, like check-wal-archive, list-processes and sync-info.
143
144 Also the following maintenance commands for catalog management work on inactive
145 servers: terminate-process, keep and check-backup.
146
147 Commands that ingest new data remain rejected on inactive servers.
148 Specifically, import-backup now cannot be used with inactive servers.
149
150 References: BAR-1343.
151
152 - Add support for parallel uploads to Google Cloud Storage
153
154 Previously, backups to Google Cloud Storage required the entire tarball
155 to be written locally before upload could begin. This was because the GCS
156 implementation did not support multipart uploads, resulting in slower
157 backups and higher disk space usage compared to AWS S3 and Azure Blob Storage.
158
159 Multipart upload is now supported for GCS backups. Data is now streamed in chunks
160 and uploaded in parallel using multiple workers (specified via `-J` / `--jobs`
161 in `barman-cloud-backup`), matching the behavior of the other cloud providers.
162
163 References: BAR-972.
164
165 - Performance improvements for restoring compressed backups from cloud storage
166
167 Restoring a compressed backup from cloud storage could take significantly
168 longer than necessary, because downloading, decompressing and extracting
169 the backup ran sequentially instead of overlapping. This has been fixed by
170 reworking the restore pipeline so these stages now run concurrently,
171 which is expected to noticeably improve restore performance for compressed
172 backups.
173
174 As a result of this change, the `tar` package is now a required
175 dependency whenever restoring a backup stored in the cloud.
176
177 References: BAR-1546.
178
179 - Add parallel WAL prefetching support to `barman-wal-archive`
180
181 The `barman-wal-archive` script now supports a `--parallel` option, which
182 enables opportunistic prefetching of additional WAL files during archival. When
183 `--parallel N` is set (N > 1), up to N - 1 extra WAL files that are ready in
184 `pg_wal/archive_status` are archived concurrently in background worker processes
185 after the primary WAL has been successfully archived. This can significantly
186 reduce WAL archival backlog during periods of high WAL generation.
187
188 Using `--parallel` requires a writable cache directory to store metadata about the
189 WAL files being parallelized. By default, this cache directory is located at
190 `/tmp/barman-SERVER_NAME-COMPUTED_HASH`, where `SERVER_NAME` is the name of the
191 PostgreSQL server being archived, and `COMPUTED_HASH` is a hash of the
192 destination (barman host, port, and config). The cache directory can be overridden
193 with the `--prefetch-cache-dir` option.
194
195 References: BAR-551.
196
197 ### Minor changes
198
199 - Script `barman-cloud-wal-restore` now exits with code 2 on network failures
200
201 `barman-cloud-wal-restore` previously always exited with code 4
202 (general error) when a WAL download failed, regardless of the cause.
203 It now exits with code 2 when the failure is caused by a loss of
204 connectivity to the cloud provider, consistent with the behaviour of
205 `barman-cloud-check-wal-archive`. This allows callers such as
206 CloudNativePG to apply different retry policies for transient network
207 errors versus permanent failures.
208
209 References: BAR-1325.
210
211 - Deprecate `--stop` option of `barman receive-wal`
212
213 The `--stop` option of `barman receive-wal` is deprecated and will be removed in a future
214 release. Use `barman terminate-process <server> receive-wal` instead.
215
216 References: BAR-724.
217
218 - Add check-archived-wal-range command to detect gaps in the WAL archive
219
220 A new `check-archived-wal-range` command has been added to Barman. It accepts a
221 server name, a `begin_wal`, and an `end_wal`, and verifies that every WAL segment
222 in that range is present in the archive. Missing segments are listed on exit, and
223 the command returns a non-zero status if any are found.
224
225 References: BAR-1324.
226
227 - Support S3 access point ARNs, including S3 on Outposts, as cloud storage destinations
228
229 Barman's S3 cloud storage support previously required a plain bucket name
230 in the destination URL. This prevented using S3 access points as a backup
231 or WAL archive destination, including Amazon S3 on Outposts access
232 points, since access point ARNs contain characters that were not handled
233 correctly, causing the ARN to be silently truncated and the destination
234 never reached.
235
236 Destination URLs can now specify an S3 access point ARN in place of a
237 bucket name, using the same ``s3://<access-point-arn>/<key>`` convention
238 already used by the AWS CLI's own S3 commands. This applies to all
239 `barman-cloud-*` commands, as well as to ``basebackups_directory`` and
240 ``wals_directory`` when configured with a cloud storage URL (for example
241 with ``backup_method = local-to-cloud`` or ``backup_method = postgres``
242 with streaming backups to the cloud).
243
244 If the destination is an access point ARN that does not exist (for
245 example due to a typo), Barman now raises a clear error explaining that
246 access points cannot be auto-created and that the underlying bucket must
247 already exist, instead of failing with a confusing, low-level error from
248 the AWS SDK.
249
250 References: BAR-1561.
251
252 - Store EBS snapshots locally on the Outpost for AWS Outposts-hosted instances
253
254 As part of AWS Outposts support, Barman now detects when a PostgreSQL
255 instance targeted for a snapshot backup is running on an AWS Outpost,
256 and creates its EBS snapshots locally on that Outpost rather than in the
257 instance's parent AWS Region. This preserves the data residency and
258 latency benefits of running on Outposts. No additional configuration is
259 required.
260
261 AWS does not support locking local EBS snapshots on Outposts, so
262 ``aws_snapshot_lock_mode`` cannot be combined with a snapshot backup of an
263 Outposts-attached instance. Barman now raises a clear error for this
264 combination instead of attempting an unsupported lock.
265
266 References: BAR-1562.
267
268 - Add keepalive support to barman-cloud-backup
269
270 `barman-cloud-backup` now sends periodic heartbeat queries (`SELECT 1`) to the
271 PostgreSQL server during the backup phase to prevent idle connection
272 timeouts caused by intermediate network devices such as firewalls and load
273 balancers. This ensures the backup session remains valid so that
274 `pg_backup_stop()` can be successfully executed after the data transfer
275 or snapshot creation is complete.
276
277 This applies to both the standard data upload path and the snapshot backup path.
278
279 The interval can be configured via the `--keepalive-interval` flag (default:
280 60 seconds). Setting the value to `0` disables the mechanism.
281
282 References: BAR-1557, BAR-1571.
283
284 - Add Zstd compression support for cloud backups
285
286 ``barman-cloud-backup`` now supports Zstd compression via the ``--zstd`` option.
287 Zstd offers a good balance between compression ratio and speed, making it
288 well-suited for cloud backup workloads.
289
290 Zstd compression requires the optional ``zstandard`` Python library to
291 be installed.
292
293 References: BAR-729.
294
295 - Add --skip-archive-wal flag to ``barman restore`` command
296
297 Added a new `--skip-archive-wal` CLI argument for `barman restore` which allows
298 users to skip the archiving of staged WAL files before initiating the restore process.
299 By default, `barman restore` archives any WAL files in the server's incoming or
300 streaming directories to reduce RPO in DR scenarios. Use this flag when you want
301 to skip this step.
302
303 References: BAR-1329.
304
305 - Improve error messages when bucket access is denied or returns a bad request
306
307 When a `barman-cloud-*` command fails to access the configured bucket due to
308 a permission error (HTTP 403 / AccessDenied / Forbidden) or a bad request
309 (HTTP 400), Barman now raises a clear, actionable error message instead of
310 a generic cloud provider exception.
311
312 The 400 case is particularly relevant for S3-compatible providers,
313 which returns a 400 response instead of a 403 when credentials
314 are invalid or misconfigured.
315
316 References: BAR-1135.
317
318 ### Bugfixes
319
320 - Fix `AttributeError` in `barman-cloud-backup-delete` with S3-compatible storage
321
322 When using `barman-cloud-backup-delete` against S3-compatible object storage,
323 an `AttributeError` could occur if the provider returned an error response with
324 an empty or absent `Message` field. This prevented the delete operation from
325 completing and obscured the underlying error code. The issue has been fixed and
326 such errors should no longer occur.
327
328 References: BAR-1207.
329
330 - Fix restore not defaulting to the latest timeline for Postgres 12 and later
331
332 Release 3.19 attempted to make PITR restores of Postgres 12 and later
333 default to the latest timeline, mirroring Postgres own
334 `recovery_target_timeline = 'latest'` default. However, that change
335 only took effect when the PITR was specified with `--target-lsn`, i.e. restoring
336 using `--target-time` or `--target-xid` still defaulted to the timeline of the
337 backup itself, potentially missing WAL files from a later timeline.
338
339 Barman now always defaults to the latest timeline for all backups taken on Postgres
340 12 or later and, even when not doing PITR.
341
342 Note: This change is only relevant for restores performed in `--no-get-wal` mode (default).
343
344 References: BAR-1373.
345
346 - Fix `barman restore` incorrectly requiring live connection to the source PG server
347
348 Release 3.19 introduced a regression that caused `barman restore` in `--no-get-wal`
349 mode (default) to require a live connection to the source Postgres server, creating
350 a dependency that is not necessary for the restore operation.
351
352 This has been fixed and no connection to the source server is required.
353
354 References: BAR-1373.
355
356 - Fix wrong end_wal recorded for postgres-method backups after a timeline switch
357
358 For backups taken with `backup_method = postgres`, the `end_wal` stored
359 in `backup.info` was computed using the timeline the backup started on,
360 rather than the server's current timeline at the time the backup
361 stopped. If a switchover or failover happened while such a backup was
362 running, this produced an incorrect `end_wal`, referring to a WAL
363 segment that was never generated on that timeline.
364
365 Barman now queries the PostgreSQL server for its current timeline when
366 computing `end_wal`, so backups that span a timeline switch are
367 recorded correctly. Though multi-timeline backups are not supported and
368 they will be marked as `FAILED`.
369
370 References: BAR-1570.
371
372 - Fix restoring incremental backups on a new Barman instance
373
374 Fixed an issue where restoring an incremental backup from the cloud on a new
375 Barman instance, which is not the same that originally took the backup, would
376 fail with a message like:
377
378 ```text
379 pg_combinebackup: error: backup at "/tmp/barman-download2628030/20260804T180402/data" is an incremental backup, but the first backup should be a full backup
380 ```
381
382 The issue is fixed and incremental backups can now be restored normally.
383
384 NOTE: This only affected incremental backups taken with a Barman server
385 (not barman-cloud-* script) and only when restoring on a new Barman instance
386 (not the same that took the backup).
387
388 References: BAR-1553.
389
390 - Fix `barman restore` failing to restore snapshot backups
391
392 Restoring a snapshot backup could fail in a few ways:
393
394 - On AWS instances that present their disks as NVMe devices, Barman
395 failed to locate the disk while checking mount points, even though it
396 was correctly attached and mounted:
397
398 ```text
399 ERROR: Error checking mount points: Error finding mount point for disk vol-04f4a47f8a04a7067: Could not find device /dev/sdd at any mount point
400 ```
401
402 The same error also caused the corresponding `barman check` snapshot
403 checks to fail with a similar message.
404
405 - Barman refused to restore, even though a snapshot recovery is expected
406 to already contain data (the disks cloned from the backup snapshots
407 are attached and mounted before the restore begins):
408
409 ```text
410 ERROR: The restore operation cannot proceed because the destination folder '/pg-volume/18/data' is not empty. To prevent accidental data loss, the destination must be empty. Please choose a different location or manually empty the folder.
411 ```
412
413 - Restoring from a snapshot backup could failed immediately with an internal
414 error when using the `--delta-restore` flag, before any recovery work was performed,
415 making recovery from snapshot backups impossible.
416
417 All of these issues have been fixed, and restoring snapshot backups now
418 works end to end.
419
420 Restores from other backup types were never affected by any of the
421 above, and still require an empty destination for both the data
422 directory and any tablespaces.
423
424 References: BAR-1554, BAR-1556, BAR-1558.
425
426 - Mark backups starting and ending on different timelines as FAILED
427
428 If a switchover or failover occurred while a backup of a standby was
429 running, causing it to start on one PostgreSQL timeline and end on
430 another, that backup remained in status `WAITING_FOR_WALS` forever,
431 never transitioning to `DONE`. Such backups are currently not supported
432 and are now detected and immediately marked as `FAILED`.
433
434 References: BAR-1053.
435
436 - Fix possible encryption passphrase leakage in debug log file
437
438 Fixed an issue where the stdout of `encryption_passphrase_command` could be logged
439 to the Barman log file when running in debug mode, potentially exposing sensitive
440 information. The passphrase command output is now captured without any logging to
441 prevent accidental exposure.
442
443 References: BAR-1320.
444
445 - Fix "cannot pickle '_thread.lock' object" error on rsync backups and restores
446
447 Python 3.14 changes the default subprocess start method from "fork"
448 to "forkserver" on POSIX platforms, which requires pickling objects to pass
449 them to worker processes. This change caused errors like the one below whenever
450 performing rsync-related operations using Python >= 3.14, e.g. performing a backup
451 with `backup_method = rsync` or restoring a backup locally or remotely.
452
453 ```text
454 ERROR: Backup failed copying files.
455 DETAILS: cannot pickle '_thread.lock' object
456 ```
457
458 The issue has been fixed by properly handling serialization of lock objects and
459 such errors should no longer occur regardless of the Python version.
460
461 References: BAR-1296.
462
463 - Fix passive node crash with KeyError when running retention on incremental backups
464
465 Fixed a bug where passive nodes would crash with a `KeyError` when running
466 retention policies on servers that have incremental backups. The crash was
467 caused by a serialization issue: when syncing backup metadata from the primary,
468 the list of child backup IDs was not correctly deserialized, resulting in a
469 corrupted `backup.info` file being written to disk. This prevented retention
470 policies from correctly associating incremental backups with their parent,
471 leading to the crash.
472
473 References: BAR-927.
474
475 - Fix WAL queue count when no `.partial` file is present
476
477 Previously, `barman check` could report an incorrect number of WAL
478 files queued for archiving. The previous logic always subtracted
479 one from the file count to compensate for the `.partial` file that the WAL
480 receiver normally keeps in the directory, but no such file exists when
481 streaming is not active or when WALs are shipped via `archive_command`.
482 Now, `.partial` files are ignored when computing the queue size, so the
483 count reflects only complete WAL segments waiting to be archived.
484
485 References: BAR-1294.
486
487 ## 3.19.1 (2026-05-26)
488
489 ### Bugfixes
490
491 - Fix `cloud-wal-restore` failing to find compressed WAL files
492
493 Fixed a bug where `barman-cloud-wal-restore` and `barman cloud-wal-restore` commands
494 would fail to locate a compressed WAL file when a backup file with the same prefix
495 existed in the cloud storage bucket.
496
497 For example, when requesting WAL `00000001000000030000001A` and the bucket
498 contained both `00000001000000030000001A.gz` and
499 `00000001000000030000001A.00000028.backup.gz`, Barman would only locate the backup
500 file and then write an error log like:
501
502 ```text
503 ERROR: WAL file 00000001000000030000001A for server pg does not exist
504 ```
505
506 The issue is now fixed and WAL files are correctly identified even when backup
507 files with the same prefix are present in the bucket.
508
509 References: BAR-1315.
510
511 ## 3.19.0 (2026-05-20)
512
513 ### Notable changes
514
515 - Add support for restoring backups from cloud storage
516
517 Barman can now restore backups taken with `backup_method = local-to-cloud`
518 or `backup_method = postgres` when stored in cloud object storage.
519
520 The standard `barman restore` command can be used to restore such backups.
521
522 For WAL restore, a new `barman cloud-wal-restore` command was introduced to fetch
523 WAL files directly from cloud storage during recovery. This command can be
524 used as the `restore_command` in PostgreSQL and supports parallel
525 fetching for improved performance.
526
527 Also, when a server has `wals_directory` configured to use cloud storage,
528 `get-wal` is now always required for restore operations. If `--no-get-wal`
529 is specified or `get-wal` is absent from `recovery_options`, Barman will
530 automatically enable `get-wal` and issue a warning so the restore can
531 proceed without interruption.
532
533 This completes the cloud backup lifecycle, enabling seamless backup and recovery
534 workflows entirely in the cloud.
535
536 References: BAR-929.
537
538 - Add new barman export-backup command for exporting backups to tarball
539
540 Introduced a new `barman export-backup` command that exports a backup to a
541 tarball format. The command takes a server name, backup ID, and destination
542 directory as arguments, and creates a tarball containing the backup data.
543 This provides an easy way to share or archive backups.
544
545 References: BAR-1180.
546
547 - Add the `barman import-backup` command for importing backups from tarball
548
549 Introduced a new `barman import-backup` command that imports a backup from a
550 tarball format. The command takes a server name and tarball path as arguments,
551 and provides a way to register previously exported backups back into a Barman
552 catalog.
553
554 References: BAR-1223.
555
556 ### Minor changes
557
558 - Support alternative GCP universes via GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable
559
560 Barman now supports alternative GCP universes (e.g. S3NS/T-Systems) by
561 reading the `GOOGLE_CLOUD_UNIVERSE_DOMAIN` environment variable. When set,
562 the value is passed as `client_options` to the GCS storage client, allowing
563 `barman-cloud-*` commands to operate against non-standard GCP endpoints.
564 This feature was contributed by community member @mgarstecki.
565
566 References: BAR-1017.
567
568 - Add support for parallel WAL restore in `barman-cloud-wal-restore`
569
570 Support for parallelism has been added to the `barman-cloud-wal-restore`
571 command, allowing users to specify a number of WALs to be downloaded in parallel
572 during the recovery of WALs. This enhancement improves the overall performance of WAL
573 restoration by prefetching multiple WAL files concurrently. Check the documentation
574 of `barman-cloud-wal-restore` for more details.
575
576 References: BAR-1253.
577
578 - Add aws_check_object_lock config option to check S3 object lock before deletion
579
580 Introduced a new `aws_check_object_lock` configuration option. When enabled,
581 Barman checks for S3 Object Lock before attempting to delete base backup files
582 from S3 storage. If an object is locked, the deletion is aborted. This aligns
583 Barman's behavior with `barman-cloud-delete` for locked objects. Only applies
584 to S3 storage; a warning is logged if this option is enabled with a non-S3
585 cloud provider.
586
587 References: BAR-1113.
588
589 - Make in-progress cloud backups visible in the backup catalog
590
591 In-progress cloud backups are now immediately visible in
592 `barman-cloud-backup-list` with `STARTED` in the archival status column
593 and an empty end time. Previously, a backup only became visible once it
594 completed successfully. `barman-cloud-backup-delete`,
595 `barman-cloud-restore`, and the `last`/`latest`/`first`/`oldest`
596 shortcuts all treat in-progress backups safely by excluding them from
597 redundancy counts, auto-restore selection, and shortcut resolution
598 respectively.
599
600 References: BAR-1235.
601
602 - Removed setuptools as a runtime dependency
603
604 Setuptools is no longer required as a runtime dependency for Barman. Setuptools
605 was previously included to provide the deprecated distutils module for Python 3.12+
606 compatibility, but it has been replaced with another implementation. Setuptools
607 remains available during build time for packaging purposes.
608
609 References: BAR-1170.
610
611 - Add --partial-wal flag to barman restore for opt-in .partial WAL file copying
612
613 A new `--partial-wal` flag has been added to `barman restore
614 --no-get-wal`. When set, Barman includes `.partial` WAL files in
615 the recovery, stripping the `.partial` suffix so that PostgreSQL can
616 find them during replay. Two sources are supported:
617
618 - The streaming WALs directory: the in-progress segment being written
619 by `pg_receivewal` at the time of the restore. Including it reduces
620 RPO by making any transactions written since the last completed WAL
621 segment available during recovery.
622 - The WAL archive (`wals/`): segments archived with the `.partial`
623 suffix, e.g. when a standby is promoted and PostgreSQL calls
624 `archive_command` with an in-progress segment. Compressed and
625 encrypted files are handled transparently.
626
627 The flag has no effect when `--get-wal` is used, as `.partial`
628 files are already handled transparently in that case.
629
630 References: BAR-695.
631
632 - Add parallel WAL archiving support to `barman cloud-wal-archive`
633
634 `barman cloud-wal-archive` now supports a `--parallel` flag (and the
635 corresponding `cloud_wal_archive_parallel` configuration option) that enables
636 opportunistic prefetching of additional WAL files during archival. When
637 `--parallel N` is set (N > 1), up to N - 1 extra WAL files that are ready in
638 `pg_wal/archive_status` are identified and uploaded concurrently in background
639 worker processes after the primary WAL has been successfully archived. This can
640 significantly reduce WAL archival backlog during periods of high WAL generation.
641 If a WAL file was already uploaded by a previous invocation, subsequent calls to
642 `archive_command` for that WAL will detect it and exit immediately with 0,
643 avoiding redundant uploads.
644
645 References: BAR-1101.
646
647 ### Bugfixes
648
649 - Fix backup metadata not being updated in the cloud storage
650
651 NOTE: This fix is for the cloud integration of Barman servers i.e. those configured
652 with `backup_method = local-to-cloud` or `backup_method = postgres` which uses
653 a cloud storage as backup destination. This is not an issue in the `barman-cloud-*`
654 scripts (e.g. barman-cloud-backup).
655
656 Backup metadata (backup.info files) was not being updated in the cloud storage, which
657 led, for example, to the status of the backup in the cloud being outdated compared
658 to the local one. This can be a problem during the restore phase, where the metadata
659 from the cloud might be the primary source of information. This issue is now fixed.
660
661 References: BAR-1227.
662
663 - Fix `barman restore --no-get-wal` copying unusable .partial WAL files
664
665 When running `barman restore --no-get-wal`, `.partial` WAL files
666 present in the WAL archive were copied to the recovery destination.
667 However, the `restore_command` generated by Barman uses `cp` from
668 the `barman_wal` directory, which does not account for `.partial`
669 suffixes — so these files were never used by PostgreSQL during
670 recovery. Barman now skips `.partial` files by default. To
671 explicitly include them (with the suffix stripped so PostgreSQL can
672 find them), use the new `--partial-wal` flag.
673
674 References: BAR-1265.
675
676 - Fix `--no-get-wal` restore not copying WALs from newer timelines on PostgreSQL 12+
677
678 Since PostgreSQL 12, the default for `recovery_target_timeline` changed from
679 `current` to `latest`. When restoring with PITR options (e.g., `--target-time`)
680 in `--no-get-wal` mode, Barman was only copying WAL files from the backup's
681 original timeline. This could cause restores to fail when the recovery target
682 is on a newer timeline.
683
684 Barman now correctly copies WAL files from all timelines up to the latest
685 available when performing PITR on PostgreSQL 12+, matching the default
686 Postgres recovery behavior.
687
688 References: BAR-1054.
689
690 - Fix multiple warnings about intermediary files not being removed
691
692 When using WAL compression, Barman creates intermediary files in the
693 archive directory during the compression process. Intermediary file paths
694 are stored in a list and removed at the end of the file archival.
695
696 However, when archiving multiple files in batch, the list of intermediary
697 files was not being cleared after each processed file, causing later
698 archivals to attempt to remove files that no longer exist, resulting in
699 warnings like the below:
700
701 ```text
702 WARNING: Could not remove intermediary file /home/gustavo/pg/streaming/0000000100000013000000FD: [Errno 2] No such file or directory: '/home/gustavo/pg/streaming/0000000100000013000000FD'
703 ```
704
705 This bug was introduced in version 3.18, commit 5db8ca9b. It is now fixed and such
706 warnings should no longer occur.
707
708 References: BAR-1228, CP-59700.
709
710 ## 3.18.0 (2026-03-12)
711
712 ### Notable changes
713
714 - Add support for incremental backups in cloud storages
715
716 Added support for block-level incremental backups in cloud storages, allowing users
717 to efficiently manage backup storage and reduce costs by only uploading changed data.
718
719 This new feature relies on streaming native Postgres backups (taken with `pg_basebackup`)
720 to Barman and from Barman directly to a cloud storage dynamically, without ever
721 storing the full backup in the Barman host, only using a small staging area. The
722 staging area location and size can be configured via the new `cloud_staging_directory`
723 and `cloud_staging_max_size` configuration options, respectively.
724
725 To configure this feature, set `backup_method = postgres` and `basebackups_directory`
726 and `wals_directory` to a cloud storage URL (e.g., `s3://my-bucket/barman`).
727
728 Example configuration:
729
730 ```ini
731 [myserver]
732 backup_method = postgres
733 basebackups_directory = s3://my-bucket/barman
734 wals_directory = s3://my-bucket/barman
735 cloud_staging_directory = /tmp/barman/cloud-staging
736 cloud_staging_max_size = 30Gi
737 ```
738
739 The backup structure in the cloud storage follows the same patterns as the current
740 barman-cloud-* scripts i.e. backup files are archived with `tar` and live under
741 directories named after the server name and the backup ID, e.g.
742 `my-bucket/barman/<server_name>/base/<backup_id>/...`, while WAL files are
743 stored in a `wals` subdirectory under the server directory, i.e.
744 `my-bucket/barman/<server_name>/wals/...`. In this sense, `basebackups_directory`
745 and `wals_directory` act as a prefix for the backup and WAL paths in the cloud
746 storage. This ensures compatibility with existing backup management practices.
747
748 Important notes:
749 - This is an experimental feature, and there are some limitations to be aware of (see
750 the documentation for details).
751 - Restoring backups taken with this method is currently not supported directly in Barman,
752 and it's the user's responsibility to perform this manually or through custom
753 scripts/processes. Restoring such backups will come in a future release.
754 - This is the first step toward unifying the barman cloud experience and simplifying
755 cloud backup operations, and more features and improvements will be added in
756 future releases.
757
758 References: BAR-928.
759
760 - Add `local-to-cloud` backup method to `barman` CLI
761
762 Introduced support for direct cloud backups through the main `barman` CLI by
763 adding a new `local-to-cloud` backup method. Previously, cloud backups were only
764 available through standalone `barman-cloud-*` scripts.
765
766 With this enhancement, you can now configure cloud backups directly in the barman
767 configuration file using `backup_method = local-to-cloud` along with a cloud storage
768 URL in `basebackups_directory` (e.g., `s3://bucket/path`). This provides a unified
769 interface for all backup methods and is the first step toward deprecating the
770 standalone `barman-cloud-*` scripts.
771
772 The new `CloudBackupExecutor` integrates seamlessly with the existing barman
773 backup infrastructure, coordinating with PostgreSQL using the low-level backup
774 API and uploading backups directly to cloud object storage.
775
776 Example configuration:
777
778 ```ini
779 [myserver]
780 backup_method = local-to-cloud
781 basebackups_directory = s3://my-bucket/barman/backups
782 conninfo = host=postgres-host dbname=postgres
783 ```
784
785 This is the first step toward unifying the barman cloud experience and simplifying
786 cloud backup operations.
787
788 The following configuration options were reused or added to the Barman
789 configuration to provide feature parity with the `barman-cloud` scripts:
790
791 - `cloud_upload_min_chunk_size`
792 - `aws_region`
793 - `aws_read_timeout`
794 - `aws_encryption`
795 - `aws_sse_kms_key_id`
796 - `bandwidth_limit`
797 - `cloud_delete_batch_size`
798 - `cloud_upload_max_archive_size`
799
800 References: BAR-1095, BAR-1116, BAR-1122, BAR-1109, BAR-1120, BAR-1121, BAR-1117, BAR-1112, BAR-1115.
801
802 - Add 'barman cloud-wal-archive' command for local-to-cloud WAL archiving
803
804 Introduced a new `barman cloud-wal-archive` command that enables direct WAL file
805 archiving from the PostgreSQL `pg_wal` directory to cloud object storage when
806 using the 'local-to-cloud' backup method. This command is designed to be used
807 as the PostgreSQL `archive_command` when the Barman server runs on the same
808 host as the PostgreSQL instance.
809
810 WAL files sent to cloud object storage can also be compressed before uploading,
811 using the existing `compression` and `compression_level` configuration options.
812 Compressed WAL files are stored with the appropriate file extension (e.g.
813 `.gz`, `.lz4`), consistent with the convention already used by
814 `barman-cloud-wal-archive`.
815
816 The following in-memory compression algorithms are supported: `gzip`, `bzip2`,
817 `xz`, `snappy`, `zstd`, and `lz4`. `pigz` and `custom` are not supported for
818 cloud WAL storage because they rely on external processes.
819
820 Example configuration:
821
822 ```ini
823 [myserver]
824 backup_method = local-to-cloud
825 archiver = on
826 wals_directory = s3://my-bucket/barman/wals
827 compression = gzip
828 compression_level = 6
829 ```
830
831 References: BAR-1098, BAR-1124.
832
833 ### Minor changes
834
835 - Add `--addressing-style` option for S3-compatible storage providers
836
837 A new `--addressing-style` option is now available for barman-cloud commands
838 when using AWS S3 or S3-compatible storage providers. This option allows
839 users to explicitly set the S3 addressing style to `auto`, `virtual`, or
840 `path`. This is useful when working with S3-compatible storage systems that
841 require virtual-hosted-style addressing, as `boto3` automatically defaults
842 to path-style addressing for non-S3 endpoints.
843
844 Special thanks to @ChandonPierre who reported and contributed to this feature
845 in the PR #1134.
846
847 References: BAR-1011.
848
849 - Add Python 3.14 compatibility support for cloud operations
850
851 Added support for Python 3.14 by fixing a breaking change in `functools.partial`
852 that affected cloud backup operations. In this version, `functools.partial` became
853 a method descriptor which changed its behavior when used as a class attribute.
854 This update ensures Barman cloud operations continues to work seamlessly
855 when upgrading to Python 3.14.
856
857 This patch is based on the original idea by @pvbiesen, who suggested the feature
858 and contributed in the PR #1143. A similar fix was also suggested by @mjlshen in
859 PR #1109.
860
861 References: BAR-1012.
862
863 - Prevent usage of barman-cloud-backup as hook for backups with compression
864
865 The usage of `barman-cloud-backup` as a hook for backups taken with compression is
866 now prevented by erroring out with an appropriate message.
867
868 This change ensures that backups with compression are not inadvertently used with
869 cloud backup hooks, given that such usage was never supported.
870
871 The behavior is also documented with a warning note.
872
873 References: BAR-1015.
874
875 - Add LZ4 compression support for Barman cloud
876
877 Added support for LZ4 compression in `barman-cloud-backup` command.
878 You can now specify the --lz4 option to compress backup files using LZ4
879 compression before uploading to cloud storage. This option is mutually exclusive
880 with other compression options (--gzip, --bzip2, --snappy), and it requires
881 the `lz4` Python library to be installed.
882
883 This feature was suggested and implemented by @vietcgi in the PR #1144.
884
885 References: BAR-1013.
886
887 - Experimental support for WarehousePG database ID configuration
888
889 Addition of experimental support for WarehousePG, which includes a new configuration
890 option `warehousepg_dbid` that allows users to specify the database ID of the
891 WarehousePG segment when using the PostgreSQL backup method. This configuration is
892 intended to enable better integration with WarehousePG for backup and restore
893 operations.
894
895 There's also an improvement in the collection of Postgres parameters due to
896 `archive_timeout` not being exposed in `pg_settings` on WarehousePG segments.
897
898 References: BAR-1092.
899
900 - Add custom restore command support for barman recover operations
901
902 Added a new `--restore-command` option to the `barman recover` command that allows
903 users to override Barman's default restore command with a custom command. While the
904 default restore command built by Barman is suitable for most cases, this option
905 allows you to specify an alternative command if your setup requires it.
906
907 Previously, users had to manually edit PostgreSQL recovery configuration files after
908 recovery to change the restore command, which was error-prone and required additional
909 manual intervention. With this new option, users can now specify a custom restore
910 command directly through the command line.
911
912 This enhancement was applied due to an issue reported in #881 by @PaganMuffin.
913
914 References: BAR-201.
915
916 ### Bugfixes
917
918 - Fix file handle leak for long-running WAL archiving services
919
920 Fixed a resource leak in the cloud WAL archiving functionality where file handles
921 were not being properly closed after uploading WAL files to cloud storage. This
922 issue could primarily affect long-running WAL archiving services that process
923 multiple WAL files in sequence, where the accumulating open file handles could
924 eventually cause "Too many open files" errors, preventing further WAL archiving
925 operations.
926
927 The fix ensures that file handles are properly closed immediately after each
928 upload operation completes, regardless of whether compression is used and even
929 when upload failures occur. This prevents handle exhaustion in services that
930 perform continuous or high-frequency WAL archiving to cloud providers.
931
932 Special thanks to @ethiebautgeorge-nasuni who contributed to this feature in
933 the PR #1129.
934
935 References: BAR-973.
936
937 ## 3.17.0 (2026-01-07)
938
939 ### Notable changes
940
941 - Enable query, fetch, and selective operations on inactive/disabled servers
942
943 Multiple Barman commands now work with inactive and disabled servers based
944 on their safety profile:
945
946 **Query commands**:
947 - `list-backups`: view backups from inactive/disabled servers
948 - `status`: check status of inactive/disabled servers
949 - `show-backup`: display backup details from inactive/disabled servers
950 - `list-files`: list files from backups on inactive/disabled servers
951 - `verify-backup`: verify backups on inactive/disabled servers
952
953 **Fetch commands**:
954 - `restore`: restore backups from inactive servers
955 - `get-wal`: retrieve WAL files from inactive servers
956
957 **Modification commands**:
958 - `delete`: delete backups from inactive servers
959 - `config-switch`: switch configuration models for inactive/disabled servers
960
961 This change improves operational flexibility by allowing users to query
962 backup information and perform restore operations even when servers are
963 manually disabled (inactive) or have configuration issues (disabled). The
964 different behavior for disabled servers provides safety against operations
965 on servers with potential configuration conflicts or path issues.
966
967 References: BAR-976.
968
969 - Deprecate custom compression for WAL files
970
971 The `custom` compression option and its related configuration options
972 (`custom_compression_filter`, `custom_decompression_filter`, and
973 `custom_compression_magic`) are now deprecated and will be removed in a
974 future release.
975
976 Users currently using custom compression are advised to migrate to one of the
977 built-in compression algorithms supported by Barman: `gzip`, `bzip2`, `lz4`,
978 `xz`, `zstd`, or `pigz`.
979
980 The custom compression feature was designed to provide flexibility for users
981 with specific compression requirements, but maintaining compatibility with
982 arbitrary external compression tools has proven to be complex and error-prone.
983 The built-in compression options provide better performance, reliability, and
984 maintainability.
985
986 Existing configurations using custom compression will continue to work in the
987 current release, but users should plan to migrate their configurations before
988 the feature is removed.
989
990 References: BAR-993.
991
992 ### Minor changes
993
994 - Handle non-UTF8 output when checking for file encryption
995
996 In certain scenarios, such as when recovering WALs via `barman-wal-restore` or
997 running `barman rebuild-xlogdb`, Barman executes the `file` command to check
998 whether a file is encrypted.
999
1000 On macOS systems (which are not officially supported), this command was reported
1001 to be raising a `UnicodeDecodeError` exception if its output contained bytes that
1002 could not be decoded using UTF-8.
1003
1004 To prevent this, Barman now handles undecodable bytes gracefully, allowing the
1005 process to continue without interruption.
1006
1007 Github issue: #1117
1008
1009 References: BAR-926.
1010
1011 - Add `--recovery-option-port` to `barman restore` command
1012
1013 When doing a remote restore with `get-wal` mode, Barman writes a `restore_command`
1014 which invokes `barman-wal-restore` to fetch WALs. However, there was currently no
1015 way to specify a custom port to the written `barman-wal-restore` command.
1016
1017 This change introduces the `--recovery-option-port` flag to the `barman restore`
1018 command, allowing users to specify a value for the `--port` option of
1019 `barman-wal-restore` command during remote restores.
1020
1021 References: BAR-943.
1022
1023 - Add S3 Object Lock support for the deletion of backups in barman-cloud
1024
1025 `barman-cloud-backup-delete` now supports checking for Object Lock before
1026 deleting backups in AWS S3. This feature helps prevent deletion of objects
1027 protected by compliance or governance retention policies.
1028
1029 A new `--check-object-lock` option has been added, which enables Object Lock
1030 verification before deletion. When enabled, the deletion operation for all objects of
1031 a base backup will be aborted if any of those objects is locked. For performance
1032 reasons, lock checks are only performed for base backup files, since once the
1033 base backup is removed, the corresponding WAL files are no longer useful.
1034
1035 Note that this feature adds overhead to the delete operation, as it requires an
1036 additional API call for each object being deleted. This feature is only available
1037 for AWS S3-compatible object stores and requires the appropriate permissions
1038 to function correctly.
1039
1040 References: BAR-946.
1041
1042 ### Bugfixes
1043
1044 - Increase coverage of non-compliant S3 object stores for backup deletion
1045
1046 With this fix we increase the coverage of non-compliant S3 object stores for backup
1047 deletion.
1048
1049 We've reduced the expression we were matching for the message returned on failure
1050 to catch any error code that returns a message that contains "content-MD5".
1051
1052 We believe with this, almost all non-compliant S3 object stores for backup deletion
1053 will be covered
1054
1055 References: BAR-974.
1056
1057 - Fix passive node not syncing
1058
1059 In Barman 3.16 the "name" field was removed from the "config" key of
1060 the `barman diagnose` command. Turns out the same "config" data is also
1061 used when syncing a passive node, and the absence of the "name" field
1062 caused the sync to fail.
1063
1064 This change adds back the "name" field to the "config" key, fixing
1065 the sync of passive nodes.
1066
1067 Reported in GitHub issue #1125.
1068
1069 References: BAR-971.
1070
1071 - Fix delta restore not working
1072
1073 The delta restore feature was not functioning correctly due to an oversight
1074 where Barman was removing the destination directory before performing a restore.
1075 The problem was fixed by avoiding the removal of the destination directory on
1076 certain operations.
1077 Reported in GitHub issue #1139.
1078
1079 References: BAR-1002.
1080
1081 - Fix "rm execution failed" errors during restore
1082
1083 As a consequence of a refactoring implemented during the release of
1084 version 3.15, Barman started removing the destination directory of the
1085 restore operation before copying backup files. This was to ensure that
1086 the files were always being copied to a clean directory.
1087
1088 However, when the destination directory is a mount point, or a
1089 subdirectory where the user does not have sufficient permissions on its parent,
1090 the removal of the directory fails, leading to errors
1091 like "rm execution failed".
1092
1093 The issue is now fixed by avoiding the removal of the destination
1094 directory for PGDATA and tablespaces on the restore final destination.
1095
1096 References: BAR-975.
1097
1098 ## 3.16.2 (2025-11-04)
1099
1100 ### Bugfixes
1101
1102 - Improve barman-cloud delete workaround to inspect error message content
1103
1104 Some S3-compatible storages return an "InvalidRequest" error instead of
1105 "MissingContentMD5" during delete operations. Since we cannot rely on the error code
1106 alone, this updates the logic to also inspect the error message text to detect
1107 MissingContentMD5-like issues and apply the appropriate fallback.
1108
1109 References: BAR-947.
1110
1111 ## 3.16.1 (2025-10-14)
1112
1113 ### Notable changes
1114
1115 - Automatic bucket creation added to barman-cloud-check-wal-archive
1116
1117 The `barman-cloud-check-wal-archive` command now verifies whether the target bucket
1118 exists in the configured cloud storage (e.g., AWS S3) and automatically creates it
1119 if it does not.
1120
1121 Previously, automatic bucket creation was handled by `barman-cloud-backup`. This
1122 change restores compatibility with CloudNativePG (CNPG) automations that depend on
1123 this behavior, which were affected after the release of Barman 3.16.0.
1124
1125 In collaboration with the CloudNativePG team, we have reintroduced this
1126 functionality specifically in `barman-cloud-check-wal-archive` to ensure seamless
1127 operation of CNPG workflows and internal tests — all while preserving the intended
1128 behavior and simplicity for regular Barman users.
1129
1130 References: BAR-931.
1131
1132 ## 3.16.0 (2025-10-02)
1133
1134 ### Notable changes
1135
1136 - The `restore_command` for local restores no longer includes `sudo`
1137
1138 When using `barman restore --get-wal` for a local restore (i.e. without
1139 `--remote-ssh-command`), the generated `restore_command` no longer includes a
1140 `sudo -u $USER` prefix. This simplifies the process for the common case where the
1141 locally restored Postgres cluster is run by the `barman` user, whom already owns the
1142 files by the end of the `barman restore` operation.
1143
1144 **Action Required:** If you intend to run the restored cluster as a different
1145 user (e.g., `postgres`), you must now manually add the appropriate
1146 `sudo -u postgres` prefix to the `restore_command` in the recovery configuration and
1147 ensure file ownership is correct.
1148
1149 References: BAR-675.
1150
1151 - Deprecate `pygzip` and `pybzip2` compression options
1152
1153 The `pygzip` and `pybzip2` compression options are now deprecated and will be
1154 removed in a future release. Users should migrate to the `gzip` and `bzip2` options,
1155 which now use Python's internal libraries.
1156
1157 This change was made to improve performance and code consistency. Previously, the
1158 `gzip` and `bzip2` options relied on external subprocesses, while their `py`
1159 counterparts used native Python libraries. The core compression logic for `gzip` and
1160 `bzip2` has been updated to also use Python's built-in libraries, making the
1161 `pygzip` and `pybzip2` options redundant.
1162
1163 References: BAR-878.
1164
1165 - Add delta-restore flag and recovery option to barman restore
1166
1167 Introduces the --delta-restore flag for barman restore, enabling delta
1168 restore mode. This mode restores a backup by reusing identical data already present
1169 in the destination directory, which drastically reduces restore time and network
1170 traffic.
1171
1172 This feature is also configurable per-server via 'recovery_options' as a new field
1173 called delta-restore in the server configuration file.
1174
1175 References: BAR-788.
1176
1177 - S3 Object Deletion Fallback for Object Stores non-compliant with boto3 >=1.36
1178
1179 When using `delete_objects()` with some non-compliant S3-compatible object
1180 stores, users could encounter a `MissingContentMD5` `ClientError` due to a breaking
1181 change in boto3 1.36 that Botocore will no longer automatically compute and populate
1182 the `Content-MD5` header.
1183
1184 To address this, Barman now implements a fallback mechanism:
1185
1186 - Bulk deletion via `delete_objects()` is still attempted first.
1187 - If `delete_objects()` fails with `MissingContentMD5`, Barman automatically falls back
1188 to deleting objects individually using `delete_object()`, which does not require a
1189 `Content-MD5` header.
1190 - Other errors continue to raise exceptions as before.
1191
1192 This change ensures Barman remains compatible with non-compliant object
1193 stores without requiring changes on the user's side.
1194
1195 Users with older S3-compatible storage can continue performing backup cleanups
1196 without failures, while newer object stores are unaffected.
1197
1198 References: BAR-909.
1199
1200 - Cloud connectivity checks are now only performed with the `-t`/`--test` flag.
1201
1202 Previously, Barman always tested cloud connectivity and bucket existence
1203 for most of the commands, raising errors if connectivity failed or if the bucket
1204 did not exist. Both checks are now executed only when the `-t`/`--test` flag is
1205 specified. The only exception was `barman-cloud-check-wal-archive`, which still
1206 checks connectivity and the existence of the bucket.
1207
1208 Additionally, buckets are no longer created automatically — Barman assumes the
1209 target bucket already exists, making it the user's responsibility to provision
1210 the bucket in advance.
1211
1212 References: BAR-895, BAR-908, BAR-918.
1213
1214 ### Minor changes
1215
1216 - Add `combine-mode` option to `barman restore` command
1217
1218 Added a `--combine-mode` option to the `barman restore` command, which can be used
1219 to specify a copy mode for `pg_combinebackup` when combining incremental backups
1220 during a restore. Available modes are `copy`, `link`, `clone`, and `copy-file-range`
1221 which are equivalent to the `pg_combinebackup` options `--copy`, `--link`,
1222 `--clone`, and `--copy-file-range`, respectively. An equivalent `combine_mode`
1223 configuration option can be specified in the configuration file.
1224
1225 This feature allows for greater optimization of the restore process
1226 based on the underlying filesystem capabilities.
1227
1228 References: BAR-870.
1229
1230 - Reorganize fields in barman diagnose JSON
1231
1232 In the barman diagnose JSON, some fields appeared under the server's "config"
1233 section even though they were not actual configuration fields.
1234
1235 The fields "barman_lock_directory", "lock_directory_cleanup", and
1236 "config_changes_queue" were relocated under the "global" key, since they represent
1237 global configurations. The "name" field was removed since the server name is already
1238 used as the key. Additionally, "msg_list" is now stored under the server's name key.
1239
1240 References: BAR-134.
1241
1242 - Add '-p JOBS' to barman-wal-restore command when `--get-wal` is `True`
1243
1244 Adds '-p JOBS' to barman-wal-restore command when `--get-wal` or `get_wal`
1245 configuration option is ``True``, `JOBS` being the number of jobs chosen by the user
1246 via `-p` flag or `parallel_jobs` configuration option.
1247
1248 References: BAR-857.
1249
1250 - The `barman show-backup`` command now displays the backup compression method
1251
1252 The output of the `barman show-backup` command has been enhanced to include a new
1253 `Backup Compression` field. If a backup was taken with compression enabled, this
1254 field will now display the compression algorithm that was used (e.g., `zstd`). This
1255 makes it easier to quickly verify the compression status of a backup.
1256
1257 References: BAR-901.
1258
1259 ### Bugfixes
1260
1261 - Fix parallelism (--parallel option) in barman-wal-restore
1262
1263 There has been a regression in `barman-wal-restore` when introducing the
1264 `--keep-compression` option in Barman 3.12.0, which made the `--parallel` option
1265 not invoke processes as expected. This issue has now been fixed.
1266
1267 References: BAR-865.
1268
1269 - Fix `pg_combinebackup` not being found in `PATH` when `staging_location` is `remote`
1270
1271 When recovering an incremental backup to a remote server with `staging_location`
1272 set to `remote`, Barman checks if `pg_combinebackup` is available in the remote `PATH`.
1273 However, a previous issue was making it incorrectly check the local `PATH` as well,
1274 leading to errors if `pg_combinebackup` was not installed locally.
1275 The problem has been fixed by ensuring that the check is only performed on the
1276 server where `pg_combinebackup` is actually executed.
1277
1278 References: BAR-903.
1279
1280 ## 3.15.0 (2025-08-05)
1281
1282 ### Notable changes
1283
1284 - Allow incremental backups to be taken with compression and encryption
1285
1286 Previously, Barman prevented incremental backups to be taken if compression was
1287 enabled or if the parent backup was already compressed. Since encryption in Barman
1288 requires compression, this also meant that incremental backups could not be taken
1289 with encryption.
1290
1291 This limitation existed due to the complexity of restoring such backups, which
1292 involves multiple staging phases for decryption, decompression, and combination of
1293 backups.
1294
1295 After a significant refactoring effort, Barman now fully supports taking incremental
1296 backups with both compression and/or encryption. This allows for more flexible backup
1297 strategies, enabling users to take advantage of all available features without
1298 restrictions.
1299
1300 References: BAR-764, BAR-801, BAR-841.
1301
1302 - Deprecate `local_staging_path` and `recovery_staging_path` configuration options
1303
1304 The `local_staging_path` and `recovery_staging_path` configuration options have been
1305 deprecated in favor of the new `staging_path` and `staging_location` options.
1306 The old options will continue to work for backwards compatibility, but users are
1307 encouraged to migrate to the new configuration options for better clarity and
1308 flexibility.
1309
1310 References: BAR-571, BAR-801.
1311
1312 - Improve flexibility and consistency of staging area configuration
1313
1314 Whenever restoring a compressed, encrypted or incremental backup, Barman needs a
1315 staging area to handle intermediate files, such as decompressed or decrypted files,
1316 or the combined incremental backup data.
1317
1318 Previously, Barman used to have different configuration options for each scenario:
1319
1320 - For incremental backups, the staging area was specified via the `local_staging_path`
1321 in the Barman configuration, which could only be a path in the Barman host.
1322
1323 - For compressed backups, the staging area was specified via the `recovery_staging_path`,
1324 which could be a path in the Barman host (in case of local recovery) or a path
1325 in the target server (in case of remote recovery to a different server).
1326
1327 - For encrypted backups, the staging area was specified via the `local_staging_path`
1328 in the Barman configuration, which could only be a path in the Barman host.
1329 Note that, since encryption requires compression to be enabled, when restoring an
1330 encrypted backup, users needed to specify both `recovery_staging_path` and
1331 `local_staging_path`.
1332
1333 Barman now provides a single, unified and more flexible staging area configuration:
1334
1335 - The new `staging_path` configuration option can be used to specify an absolute path
1336 for the staging area, where intermediate files will be stored. The default value
1337 is `/tmp`.
1338
1339 - The new `staging_location` configuration option can be used to specify whether the
1340 staging area is on the Barman host (`local`) or on the remote server (`remote`).
1341 The default value is `local`.
1342
1343 This means that, besides having a unified configuration for the staging path, users
1344 are now also able to specify with more flexibility where the staging area should
1345 be located, either on the Barman host or on the remote Postgres server.
1346
1347 Storage usage has also been optimized to reduce resource consumption whenever
1348 possible. This includes:
1349
1350 - Removing intermediate files as soon as they are no longer needed.
1351 - Avoid using the staging area when not necessary, e.g. when restoring a
1352 compressed backup locally, no staging is needed and the backup is decompressed
1353 directly to its final destination.
1354
1355 This change simplifies configuration and improves consistency and resource usage,
1356 making the recovery management more transparent and predictable for end users.
1357
1358 References: BAR-764, BAR-765, BAR-801, BAR-841.
1359
1360 ### Minor changes
1361
1362 - Add `--staging-path` and `--staging-location` to `barman restore`
1363
1364 Added `--staging-path` and `--staging-location` options to `barman restore`
1365 command to allow the user to specify a custom path for the staging area
1366 during the restore process. `--staging-path` is the absolute path to be used while
1367 `--staging-location` defines its location i.e. `local` or `remote`. They also have
1368 its equivalent configuration options in `barman.conf` as `staging_path` and
1369 `staging_location` respectively.
1370
1371 References: BAR-570.
1372
1373 - Add option `--if-not-exists` to `barman receive-wal --create-slot`
1374
1375 A new `--if-not-exists` flag has been added to the `barman receive-wal --create-slot`
1376 command. This prevents the command from failing when attempting to create a
1377 replication slot that has already been created, making it more reliable for
1378 use in scripts.
1379
1380 Special thanks to @crazybolillo <[email protected]> a.k.a @antonag32 for
1381 creating a PR and contributing to Barman.
1382
1383 References: BAR-527.
1384
1385 - Fail gracefully when an unexpected field is found in the backup metadata.
1386
1387 This update improves how Barman handles backup metadata that includes fields unknown
1388 to the current version. This situation can occur when attempting to restore a backup
1389 created with a newer version of Barman using an older one. For example, if a newer
1390 version adds metadata about encryption, and the older version doesn't recognize that
1391 field. That's a case where this change is relevant.
1392
1393 Previously, this would cause an unhelpful exception. Now, Barman will display a
1394 clearer message explaining that the backup was created with a newer version and may
1395 not be compatible with the current version.
1396
1397 References: BAR-763.
1398
1399 - Improve orphan backup warning for proper cleanup
1400
1401 The warning message for orphan backups has been improved to help users fully
1402 clean up incomplete or manually removed backups. Previously, the message did not
1403 mention the location of the `backup.info` file, which led to confusion. The updated
1404 message now clearly indicates the location of the `backup.info` file to help users
1405 properly remove it.
1406
1407 References: BAR-793.
1408
1409 - Improve tag handling in cloud commands to fix parsing errors
1410
1411 The `--tags` command-line option in `barman-cloud-backup` and
1412 `barman-cloud-wal-archive` has been replaced to improve parsing
1413 reliability and align with standard CLI practices. The previous
1414 space-separated format could cause parsing errors, especially when
1415 placed before positional arguments.
1416
1417 The commands now accept multiple `--tag` flags, one for each key-value pair.
1418
1419 **Before:**
1420 `barman-cloud-backup ... --tags key1,val1 key2,val2`
1421
1422 **After:**
1423 `barman-cloud-backup ... --tag key1,val1 --tag key2,val2`
1424
1425 The ``--tags`` option is now deprecated. While existing scripts using the old
1426 ``--tags`` format will continue to work, users are encouraged to update their
1427 scripts to the new format. This change is backward compatible and does not introduce
1428 a breaking change.
1429
1430 References: BAR-441.
1431
1432 - Clarify `WAL Number` label in barman show-backup output
1433
1434 Rename misleading `WAL Number` label in `barman show-backup` output to
1435 `Number of WALs`.
1436
1437 References: BAR-791.
1438
1439 - Change "No of files" to "Number of files" in show-backup command
1440
1441 In the Wal Information section of the show-backup command, the output of
1442 "No of files" was changed to "Number of files".
1443
1444 References: BAR-798.
1445
1446 - Validate options passed for servers and models through `config-update`
1447
1448 The `barman config-update` command now performs extra validation on each
1449 provided section before enqueuing changes. It verifies, among other things,
1450 that all required fields are present, that the provided values conform to
1451 the expected types, and that each value also passes its respective parser.
1452 In addition, the command will now error out if any of the checks fail. This
1453 prevents partial or malformed updates from being applied.
1454
1455 References: BAR-142.
1456
1457 - Add `--check-timeout` argument to `barman check` and `barman backup` commands
1458
1459 A new CLI option has been introduced for the `barman check` and `barman backup`
1460 commands to address situations where the check operation duration exceeds the
1461 configured `check_timeout`, preventing backups from being scheduled. This option
1462 allows users to disable the timeout or override the default or configured
1463 `check_timeout` value.
1464
1465 References: BAR-219.
1466
1467 - Add `--list-empty-directories` to `barman list-files` command
1468
1469 Adds a new `--list-empty-directories` argument to the `list-files`
1470 command to add empty directories to the listing.
1471
1472 References: BAR-220.
1473
1474 - Improve archiving check with automatic WAL switching and archiving
1475
1476 To improve the user experience, especially during initial server configuration, the
1477 `barman check` command is now more robust.
1478
1479 Previously, when the WAL archive was empty, the check would fail and require manual
1480 intervention.
1481
1482 Barman now intelligently handles this by first attempting to archive any existing
1483 WAL present in the Barman server. If none exists, it automatically triggers a WAL
1484 switch in the Postgres server and tries to archive the resulting file. This enhancement
1485 automates a common manual step and makes the initial health check more reliable
1486 out-of-the-box.
1487
1488 References: BAR-718.
1489
1490 - Support shortcuts as backup IDs in Barman cloud scripts
1491
1492 It is now possible to specify the shortcuts `first`/`oldest`, `last`/`latest` and
1493 `last-failed` when referencing backups in the Barman cloud commands. Barman now
1494 automatically parses these shortcuts and returns their associated backup ID.
1495
1496 References: BAR-717.
1497
1498 ### Bugfixes
1499
1500 - Ignore data files of temporary tables during backups
1501
1502 Files that match the pattern of temporary relation files will now be
1503 ignored during a `rsync` backup, similar to the exclusion implicitly
1504 performed by `pg_basebackup`. This is needed to avoid errors when running
1505 Barman in rsync-concurrent mode against a Postgres instance that creates
1506 and drops many temporary tables, since rsync might try to copy a temp file
1507 that had already been removed, causing Barman to hang until manually unblocked.
1508
1509 References: BAR-266.
1510
1511 - Improve error message when `pg_combinebackup` is not found
1512
1513 Previously, when restoring an incremental backup and `pg_combinebackup` was
1514 not available in the PATH, Barman did not handle the exception properly, which
1515 made it difficult to understand and fix the error.
1516 Now, a proper exception is raised with a clear message indicating that
1517 `pg_combinebackup` could not found in the target server.
1518
1519 References: BAR-840.
1520
1521 - Fail on restore if the target data or tablespace directories are not empty.
1522
1523 Previously, Barman did not verify whether tablespace destination directories were
1524 empty before restoring, which could result in their contents being silently
1525 overwritten — potentially causing data loss or corruption. Now, the restore process
1526 ensures that all destination directories, including those for data and tablespaces,
1527 are empty before proceeding. If any are not, Barman will halt the operation and
1528 display an appropriate error message, significantly improving safety and data
1529 integrity for both local and remote restores.
1530
1531 References: BAR-787.
1532
1533 - Fix errors when deleting orphaned and obsolete backups
1534
1535 Resolved an issue where applying retention policies could fail if a backup
1536 was both orphaned and obsolete. Barman now verifies that a base backup
1537 directory exists before attempting to delete it, preventing errors when the
1538 directory has already been removed.
1539
1540 References: BAR-794.
1541
1542 - Ensure correct WAL segment naming for PG17 boundary LSNs
1543
1544 Addresses a backup hang issue experienced with PostgreSQL 17 and later versions when
1545 using barman backup `<server>` --wait on low-activity instances and modifies the logic
1546 within the methods and properties that interact with pg_walfile_name() and
1547 pg_walfile_name_offset().
1548
1549 As described in barman#1041, PostgreSQL 17 altered the behavior where the end WAL of
1550 a backup is now the currently written WAL file, rather than the last completed one.
1551 On servers with minimal activity, this current WAL file might not be completed or
1552 archived promptly, leading to the backup process stalling indefinitely until a
1553 pg_switch_wal() occurs.
1554
1555 More details on the PostgreSQL change can be found at
1556 `https://www.postgresql.org/docs/release/17.0/`.
1557
1558 References: BAR-519.
1559
1560 - Snapshot Backup Now Supports Non-Root EBS Volumes of Nitro instances on AWS
1561
1562 Resolved an issue where snapshot backups failed to detect non-root EBS volumes on
1563 NVMe (Nitro) devices in AWS. Snapshot backups now work reliably with all non-root
1564 EBS volumes attached to the instance.
1565
1566 References: BAR-500.
1567
1568 ## 3.14.1 (2025-06-18)
1569
1570 ### Bugfixes
1571
1572 - Fix WAL archiving performance issues
1573
1574 The Barman WAL archiving process was suffering from a performance degradation due to
1575 processing of WAL files that would not be archived in the current run. There was also an
1576 oversight in the encryption logic introduced in 3.14, that caused Barman to check
1577 for encryption in WAL files streamed to the server, which is unnecessary as streamed
1578 WALs are never GPG-encrypted, nor compressed. With both issues fixed, the archiving
1579 process will be significantly faster and more resource-efficient.
1580
1581 Thanks to @thealex55 for the detailed analysis in the issue #1087.
1582
1583 References: BAR-775.
1584
1585 ## 3.14.0 (2025-05-15)
1586
1587 ### Notable changes
1588
1589 - Implementation of GPG encryption for tar backups and WAL files
1590
1591 Implement GPG encryption of tar backups. Encryption starts at the end of the backup,
1592 encrypting the backup of PGDATA and tablespaces present in the backup directory.
1593 Encrypted backup files will have the `.gpg` extension added.
1594
1595 Barman supports the decryption and restoration of GPG-encrypted backups using a
1596 passphrase obtained through the new `encryption_passphrase_command` configuration
1597 option. During the restore process, decrypted files are staged in the `local_staging_path`
1598 setting on the Barman host, ensuring a reliable and safe restore process.
1599
1600 New configuration options required for encryption and decryption of backups
1601 and WAL files needed to be added. The new options are `encryption`,
1602 `encryption_key_id`, and `encryption_passphrase_command`.
1603
1604 WAL files are all encrypted with GPG when `encryption = gpg`. This includes
1605 changing the way that xlogdb records are read and written (maintaining backwards
1606 compatibility), and a new logic to detect when files are encrypted and the
1607 encryption process itself.
1608
1609 Decryption of GPG-encrypted WAL files during the restore process when using the
1610 get-wal and no-get-wal flags of the barman restore command. This extends the
1611 functionality added for decrypting backups via the
1612 `encryption_passphrase_command` configuration option.
1613
1614 There's a new field in `show-backup` to expose if a backup was encrypted, and
1615 specifies the encryption method that was used, if any.
1616
1617 The `barman check` command verifies if the user's encryption settings are
1618 correctly configured in the Barman server and functioning as expected.
1619
1620 References: BAR-683, BAR-687, BAR-693, BAR-669, BAR-671, BAR-692, BAR-685, BAR-680, BAR-670, BAR-681, BAR-702.
1621
1622 - Deprecation of Python versions 3.6 and 3.7
1623
1624 As of version 3.14 of Barman, we are deprecating support for Python
1625 3.6 and 3.7, which are not supported by the Python community anymore.
1626 Barman still supports Python 3.8 as it's the newest version available on
1627 RHEL 8 systems which contains all needed modules.
1628
1629 References: BAR-737.
1630
1631 ### Minor changes
1632
1633 - Allow compression level to be specified for WAL compression in Barman server
1634
1635 Add a new `compression_level` parameter to the Barman configuration.
1636 This option accepts a valid integer value or one of the predefined options:
1637 `low`, `medium`, and `high`. Each option corresponds to a different
1638 level depending on the compression algorithm chosen.
1639
1640 References: BAR-540.
1641
1642 - Add client-side compression to `barman-wal-archive`
1643
1644 Client-side compression options have been added to `barman-wal-archive`,
1645 supporting the same algorithms that are available on a Barman server.
1646 When enabled, compression is applied on the client side before sending the WAL to
1647 the Barman server. The `--compression-level` parameter allows specifying a desired
1648 compression level for the chosen algorithm.
1649
1650 References: BAR-262.
1651
1652 - Add --compression-level parameter to barman-cloud-wal-archive
1653
1654 A parameter called `compression-level` was added to `barman-cloud-wal-archive`,
1655 which allows a level to be specified for the compression algorithm in use.
1656
1657 References: BAR-557.
1658
1659 - Add Snappy compression algorithm to Barman server
1660
1661 The Snappy compression, previously only available in `barman-cloud-wal-archive`, is
1662 now also available for standard Barman server. As with all other algorithms, it can
1663 be configured by setting `snappy` in the `compression` configuration parameter.
1664
1665 References: BAR-557.
1666
1667 - Introduce the new `list-processes` sub-command for listing the server processes
1668
1669 Add a new `list-processes` command that outputs all active subprocesses for
1670 a Barman server. The command displays each process's PID and task.
1671
1672 References: BAR-664.
1673
1674 - Introduce the new `terminate-process` sub-command for terminating Barman subprocesses
1675
1676 Add a new `terminate-process` command that allows users to terminate an active
1677 Barman subprocess for a given server by specifying its task name. Barman will
1678 terminate the subprocess as long as it belongs to the specified server and it is
1679 currently active.
1680
1681 References: BAR-665.
1682
1683 - Remove the pin from boto3 version used in cloud scripts
1684
1685 After thorough investigation of issues with boto3 >= 1.36, we've
1686 decided to remove the pin that kept the dependency at version
1687 1.35.
1688
1689 Both AWS and MinIO object stores work correctly with the latest version, and using
1690 a version of boto3 that is >= 1.36 ensures the Barman cloud scripts work in a
1691 FIPS-compliant environment.
1692
1693 References: BAR-637.
1694
1695 ### Bugfixes
1696
1697 - Ensure minimum redundancy check considers only 'non-incremental backups'
1698
1699 An issue was reported where the `minimum_redundancy` rule could be violated due to
1700 the inclusion of incremental backups in the redundancy count. As an example: in a
1701 scenario where the catalog contained one full backup and two dependent incremental
1702 backups, and the user had `minimum_redundancy = 2`, the rule was incorrectly
1703 considered satisfied. As a result, deleting the full backup triggered cascading
1704 deletion of its incremental dependents, leaving zero backups in the catalog.
1705
1706 This issue has been fixed by updating the `minimum_redundancy` logic to consider
1707 only non-incremental backups (i.e. only full, rsync, snapshot). This ensures that
1708 full backups cannot be deleted if doing so would violate the configured minimum
1709 redundancy level.
1710
1711 References: BAR-707.
1712
1713 - Fix usage of `barman-wal-restore` with `--keep-compression` using `gzip`, `bzip2`, and `pigz` compression algorithms
1714
1715 Fix an issue in `barman-wal-restore` where, when trying to restore WALs
1716 compressed with `gzip`, `bzip2` or `pigz` while having `--keep-compression`
1717 specified, leading to unexpected errors.
1718
1719 References: BAR-722.
1720
1721 ## 3.13.3 (2025-04-24)
1722
1723 ### Bugfixes
1724
1725 - Fix local restore of block-level incremental backups
1726
1727 When performing a local restore of block-level incremental backups, Barman was
1728 facing errors like the following:
1729
1730 ```text
1731 ERROR: Destination directory '/home/vagrant/restore/internal_no_get_wal' must be empty
1732 ```
1733
1734 That error was caused by a regression when the option `--staging-wals-directory`
1735 was introduced in version 3.13.0. Along with it came a new check to ensure the WAL
1736 destination directory was empty before proceeding. However, when restoring
1737 block-level incremental backups locally, Barman was setting up the WAL destination
1738 directory before performing this check, triggering the error above.
1739
1740 References: BAR-655.
1741
1742 - Fix regression when running `barman-cloud-backup` as a hook
1743
1744 Barman 3.13.2 changed the location of the `backup.info` metadata file as part
1745 of the work delivered to fix issues in WORM environments.
1746
1747 However, those changes introduced a regression when using `barman-cloud-backup`
1748 as a backup hook in the Barman server: the hook was not aware of the new location
1749 of the metadata file.
1750
1751 This update fixes that issue, so `barman-cloud-backup` becomes aware of the new
1752 folder structure, and properly locates the `backup.info` file, avoiding runtime
1753 failures.
1754
1755 References: BAR-696.
1756
1757 - Avoid decompressing partial WAL files when custom compression is configured
1758
1759 Fixed an issue where Barman attempted to decompress partial WAL files when
1760 custom compression was configured. Partial WAL files are never compressed,
1761 so any attempt to decompress them is incorrect and caused errors when using
1762 the `--partial` flag with `barman-wal-restore` or `barman get-wal`.
1763
1764 References: BAR-697.
1765
1766 - Fixed `barman-cloud-backup` not recycling temporary part files
1767
1768 This fixes a `barman-cloud-backup` problem where temporary part files were not
1769 deleted after being uploaded to the cloud, leading to disk space exhaustion.
1770 The issue happened only when using Python >= 3.12 and it was due to a change
1771 in Python that removed the `delete` attribute of named-temporary file
1772 objects, which Barman used to rely on when performing internal checks.
1773
1774 References: BAR-674.
1775
1776 - Fixed backup annotations usage in WORM environments
1777
1778 Barman previously stored backup annotation files, used to track operations like
1779 `barman keep` and `barman delete`, inside the backup directory itself. These
1780 annotations help determine whether a backup should be kept or marked for deletion.
1781 However, in WORM environments, files in the backup directory cannot be modified or
1782 deleted after a certain period, which caused issues with managing backup states.
1783 This fix relocates annotation files to a dedicated metadata directory, as to
1784 ensure that such operations function correctly in WORM environments.
1785
1786 References: BAR-663.
1787
1788 ## 3.13.2 (2025-03-27)
1789
1790 ### Minor changes
1791
1792 - Fix errors when using an immutable storage
1793
1794 Added a new `worm_mode` configuration to enable WORM (Write Once Read Many)
1795 handling in Barman, allowing it to support backups on immutable storage.
1796
1797 This fix also provides automatic relocation of the backup.info file in a new
1798 directory `meta` inside `backup_directory`. This will let Barman update it
1799 in future when needed.
1800
1801 Barman will also _not_ purge the wals directory for WAL files that are not
1802 needed when running the first backup. This will add some extra space
1803 which will be reclaimed when this first backup is obsolete and removed
1804 (by that time, the backups and the WALs will be outside the retention
1805 policy window).
1806
1807 Added additional notes to the documentation explaining limitations when
1808 running with an immutable storage for backups. In particular the need
1809 for a grace period in the immutability of files and the fact that
1810 `barman keep` is not supported in these environments.
1811
1812 References: BAR-649, BAR-645, BAR-650, BAR-651, BAR-652.
1813
1814 ## 3.13.1 (2025-03-20)
1815
1816 ### Minor changes
1817
1818 - Improve behavior of the backup shortcuts `last-full` / `latest-full`
1819
1820 The shortcuts `last-full` / `latest-full` were retrieving not the last full backup of
1821 the server, but the last full backup of the server which was eligible as the parent
1822 for an incremental backup.
1823
1824 While this was the expected behavior, the feedback from the community has shown that
1825 it was confusing for the users.
1826
1827 From now on, the shortcuts `last-full` / `latest-full` will retrieve the last full
1828 backup of the Barman server, independently if that backup is eligible as the parent
1829 for an incremental backup or not.
1830
1831 The eligibility of the full backup as the parent of an incremental backup will still
1832 be validated by Barman in a later step, and a proper message will be displayed in
1833 case it doesn't suit as a parent.
1834
1835 References: BAR-555.
1836
1837 ### Bugfixes
1838
1839 - Fix error message when parsing invalid `--target-time` in `barman restore`
1840
1841 When using the `barman restore` command, the error message when parsing invalid
1842 `--target-time` string was:
1843
1844 ```text
1845 EXCEPTION: local variable 'parsed_target' referenced before assignment
1846 ```
1847
1848 That exception was replaced with an understandable error message.
1849
1850 References: BAR-627.
1851
1852 - Fix mutual exclusive arguments in the cloud restore command
1853
1854 In the `barman-cloud-restore` command, we were checking that `target_tli` and
1855 `target_lsn` were mutually exclusive arguments, where the correct pair to check
1856 would be `target_time` and `target_lsn`.
1857
1858 References: BAR-624.
1859
1860 - Fix Barman not honoring `custom_decompression_filter`
1861
1862 Fixed an issue where Barman was not honoring the configured
1863 `custom_decompression_filter` if the compression algorithm specified
1864 was natively supported by Barman. Custom filters now take priority
1865 over native handlers when decompressing WAL files.
1866
1867 References: BAR-584.
1868
1869 - Fix barman restore with --no-get-wal and --standby
1870
1871 Fixed an issue where Barman was removing the `pg_wal` directory during
1872 recovery if `--no-get-wal` and `--standby-mode` were specified together.
1873 The issue happened due to Barman incorrectly filling the recovery parameters
1874 referencing `pg_wal`, including `recovery_end_command`, which led to this
1875 issue. Barman will now ignore filling such parameters as they are not required
1876 for this specific case.
1877
1878 References: BAR-630.
1879
1880 - Fix argument parsing issue in `barman restore` and `barman-cloud-restore`
1881
1882 In Barman 3.13.0, a regression was introduced causing errors when using
1883 `barman restore` and `barman-cloud-restore` commands. Specifically, the
1884 `backup_id` positional argument, which was made optional in that version,
1885 conflicted with other arguments, causing unrecognized arguments and errors.
1886
1887 For example, running `barman-cloud-restore` like this:
1888
1889 ```text
1890 barman-cloud-restore source_url server_name backup_id --cloud-provider aws-s3 recovery_dir
1891 ```
1892
1893 Would trigger an error like this:
1894
1895 ```text
1896 barman-cloud-restore: error: unrecognized arguments: recovery_dir
1897 ```
1898
1899 This fix resolves the issue by making `backup_id` a required argument
1900 again. Additionally, a new "auto" value is now accepted as a `backup_id`,
1901 allowing Barman to automatically choose the best backup for restoration
1902 without needing a specific `backup_id`. This update fixes argument handling
1903 and still allows a smooth and flexible restoration process for the user.
1904
1905 References: BAR-596.
1906
1907 ## 3.13.0 (2025-02-20)
1908
1909 ### Notable changes
1910
1911 - Add new xlogdb_directory configuration
1912
1913 Introduces a new `xlogdb_directory` configuration option. This parameter can be
1914 set either globally or per-server, and allows you to specify a custom directory
1915 for the `xlog.db` file. This file stores metadata of archived WAL files and is used
1916 internally by Barman in various scenarios. If unset, it defaults to the value of
1917 `wals_directory`. Additionally, the file was also renamed to contain the server name
1918 as a prefix.
1919
1920 References: BAR-483.
1921
1922 - Make "backup_id" optional when restoring a backup
1923
1924 Historically, Barman always required a "backup_id" to restore a backup, and would
1925 use that backup as the source for the restore.
1926
1927 This feature removes the need for specifying which backup to use as a source for
1928 restore, making it optional.
1929
1930 This change applies to both Barman and the barman-cloud scripts.
1931
1932 Now the user is able to restore a backup in the following ways:
1933 1. Provide a "backup_id"
1934 2. Do not provide a "backup_id". It will retrieve the most recent backup
1935 3. Do not provide a "backup_id", but provide a recovery target, such as:
1936 - "target_time" (mutually exclusive with target_lsn)
1937 Will get the closest backup prior to the "target_time"
1938 - "target_lsn" (mutually exclusive with "target_time")
1939 Will get the closest backup prior to the "target_lsn"
1940 - "target_tli" (can be used combined with "target_time" or "target_lsn")
1941 Will get the most recent backup that matches the timeline. If combined with
1942 other recovery targets, it will get the most recent backup prior to the
1943 target_time or target_lsn that matches the timeline
1944
1945 The recovery targets `--target-xid`, `--target-name` and `--target-immediate`
1946 are not supported, and will error out with a message if used.
1947
1948 This feature will provide flexibility and ease when restoring a postgres cluster.
1949
1950 References: BAR-541, BAR-473.
1951
1952 ### Minor changes
1953
1954 - Add current active model to `barman show-server` and `barman status`
1955
1956 Previously, after applying a configuration model, the only way to check
1957 which model is currently active for a server was via the `barman diagnose`
1958 command. With this update, the `barman status` and `barman show-server`
1959 commands now also display the current active configuration model for a
1960 server, if any.
1961
1962 References: BAR-524, BAR-400.
1963
1964 - Add `--staging-wal-directory` option to `barman restore` command to allow alternative WAL directory on PITR
1965
1966 A new command line option `--staging-wal-directory` was added to the `restore`/`recover`
1967 command to allow an alternative destination directory for WAL files when performing
1968 PITR. Previously, WAL files were copied to a `barman_wal` directory within
1969 the restore destination directory. This enhancement provides greater flexibility, such as
1970 storing WALs on separate partitions during recovery.
1971
1972 References: BAR-224.
1973
1974 - Pin boto3 version to any version <= 1.35.99
1975
1976 Boto3 version 1.36 has changed the way S3 integrity is checked making this version
1977 incompatible with the current Barman code, generating the following error:
1978
1979 An error occurred (MissingContentLength) when calling the PutObject operation
1980
1981 As a temporary workaround, the version for boto3 is pinned to any version <= 1.35.99
1982 until support for 1.36 is implemented in Barman.
1983
1984 References: BAR-535.
1985
1986 - Make barman-wal-archive smarter when dealing with duplicate WAL files
1987
1988 Under some corner cases, Postgres could attempt to archive the same WAL twice.
1989 For example: if `barman-wal-archive` copies the WAL file over to the Barman host,
1990 but the script is interrupted before reporting success to Postgres. New executions
1991 of `barman-wal-archive` could fail when trying to archive the same file again
1992 because the WAL was already copied from Postgres to Barman, but not yet processed by
1993 the asynchronous Barman WAL archiver.
1994
1995 This minor change deals with this situation by verifying the checksum of the
1996 existing and the incoming file. If the checksums match the incoming file is
1997 ignored, otherwise an output info message is sent and the incoming file is moved to
1998 the errors directory. The code will exit with 0 in both situations, avoiding WALs
1999 piling up in the Postgres host due to a failing `archive_command`.
2000
2001 References: BAR-225.
2002
2003 - Document procedure to clear WAL archive failure check
2004
2005 While redesigning the Barman docs we missed adding a note advising
2006 users to run a `switch-wal` command if the server is idle and
2007 `barman check` returns a failure on "WAL archiving".
2008
2009 This addresses the gap left from the previous documentation.
2010
2011 References: BAR-521.
2012
2013 - Delete WALs by deleting the entire directory at once, when possible
2014
2015 Previously, when WAL files needed to be deleted (e.g., due to deletion of a backup),
2016 Barman would iterate over every WAL file and delete them individually. This could
2017 cause performance issues, mainly in systems which use ZFS filesystem. With this
2018 change, the entire directory will be deleted whenever noticed that all files in
2019 the directory are no longer needed by Barman.
2020
2021 References: BAR-511.
2022
2023 - Add support for `DefaultAzureCredential` option on Azure authentication
2024
2025 Users can now explicitly use Azure's `DefaultAzureCredential` for authentication
2026 by using the `default` option for `azure_credential` in the server configuration
2027 or the `--azure-credential default` option in the case of `barman-cloud-*`.
2028 Previously, that could only be set as a fallback when no credential was provided
2029 and no environment variables were set.
2030
2031 References: BAR-539.
2032
2033 - Improve diagnose output for retention policy info
2034
2035 Improves the output of the barman diagnose command to display a more user-friendly
2036 string representations. Specifically, "REDUNDANCY 2" is shown instead of
2037 "redundancy 2 b" for the 'retention_policy' attribute, and "MAIN" is shown instead
2038 of "simple-wal 2 b" for the 'wal_retention_policy' attribute.
2039
2040 References: BAR-100.
2041
2042 ### Bugfixes
2043
2044 - Fix PITR when using `barman restore` with `--target-tli`
2045
2046 Barman was not creating the `recovery.signal` nor filling `recovery_target_timeline`
2047 in `postgresql.auto.conf` in these cases:
2048
2049 - The only recovery target passed to `barman restore` was `--target-tli`; or
2050 - `--target-tli` was specified with some other `--target-*` option, but the
2051 specified target timeline was the same as the timeline of the chosen backup.
2052
2053 Now, if any `--target-*` option is passed to `barman restore`, that will be
2054 correctly treated as PITR.
2055
2056 References: BAR-543.
2057
2058 - Fix bug when AWS 'profile' variable is referenced before assignment
2059
2060 An issue was introduced by BAR-242 as part of the Barman 3.12.0 release.
2061 The issue was causing `barman-cloud-backup-delete` (and possibly other
2062 commands) to fail with errors like this when `--aws-profile` argument or
2063 `aws_profile` configuration were not set:
2064
2065 ```bash
2066 ERROR: Barman cloud backup delete exception: local
2067 variable 'profile' referenced before assignment`
2068 ```
2069
2070 References: BAR-518.
2071
2072 - Fix --zstd flag on barman-cloud-wal-archive
2073
2074 Fixed a bug with the `--zstd` flag on `barman-cloud-wal-archive` where it was
2075 essentially being ignored and not really compressing the WAL file before upload.
2076
2077 References: BAR-567.
2078
2079 ## 3.12.1 (2024-12-09)
2080
2081 ### Bugfixes
2082
2083 - Add isoformat fields for backup start and end times in json output
2084
2085 This patch modifies the json output of the infofile object
2086 adding two new fields: `begin_time_iso` and `end_time_iso`.
2087 The new fields allow the use of a more standard and timezone aware
2088 time format, preserving compatibility with previous versions.
2089 It is worth noting that in the future the iso format for dates will be the
2090 standard used by barman for storing dates and will be used everywhere
2091 non human readable output is requested.
2092
2093 As part of the work, this patch reverts BAR-316, which was introduced on Barman
2094 3.12.0.
2095
2096 References: BAR-494.
2097
2098 ## 3.12.0 (2024-11-21)
2099
2100 ### Minor changes
2101
2102 - Add FIPS support to Barman
2103
2104 The `md5` hash algorithm is not FIPS compliant, so it is going to be replaced by
2105 `sha256`. `sha256` is FIPS compliant, vastly used, and is considered secure for most
2106 practical purposes.
2107 Up until this release, Barman's WAL archive client used `hashlib.md5` to generate
2108 checksums for tar files before they were sent to the Barman server. Here, a tar file is
2109 a file format used for bundling multiple files together with a `MD5SUMS` file that lists
2110 the checksums and their corresponding paths.
2111 In this release, the `md5` hashing algorithm is replaced by `sha256` as the default.
2112 As a result, checksums for the tar files will be calculated using `sha256`, and the
2113 `MD5SUMS` file will be named `SHA256SUMS`. Barman still has the ability to use the
2114 nondefault `md5` algorithm and the `MD5SUMS` file from the client if there is a use
2115 case for it. The user just needs to add the `--md5` flag to the `barman-wal-archive`
2116 `archive_command`.
2117
2118 References: BAR-155, CP-34954, CP-34391.
2119
2120 - Removed el7, debian10, and ubuntu1804 support; updated Debian and SLES.
2121
2122 Support for el7, debian10, and ubuntu1804 has been removed. Additionally, version 12
2123 and version name "bookworm" has been added for Debian, addressing a previously
2124 missing entry. The SLES image version has also been updated from sp4 to sp5.
2125
2126 References: BAR-389.
2127
2128 - Add support for Postgres Extended 17 (PGE) and Postgres Advanced Server 17 (EPAS)
2129
2130 Tests were conducted on Postgres Extended 17 (PGE) and Postgres Advanced Server 17
2131 (EPAS), confirming full compatibility with the latest features in Barman. This
2132 validation ensures that users of the latest version of PGE and EPAS can leverage all the new
2133 capabilities of Barman with confidence.
2134
2135 References: BAR-331.
2136
2137 - Improve WAL compression with `zstd`, `lz4` and `xz` algorithms
2138
2139 Introduced support for xz compression on WAL files. It can be enabled by specifying
2140 `xz` in the `compression` server parameter. WALs will be compressed when entering
2141 the Barman's WAL archive. For the cloud, it can be enabled by specifying `--xz`
2142 when running `barman-cloud-wal-archive`.
2143
2144 Introduced support for zstandard compression on WAL files. It can be enabled by
2145 specifying `zstd` in the `compression` server parameter. WALs will be compressed
2146 when entering the Barman's WAL archive. For the cloud, it can be enabled by
2147 specifying `--zstd` when running `barman-cloud-wal-archive`.
2148
2149 Introduced support for lz4 compression on WAL files. It can be enabled by
2150 specifying `lz4` in the `compression` server parameter. WALs will be compressed
2151 when entering the Barman's WAL archive. For the cloud, it can be enabled by
2152 specifying `--lz4` when running `barman-cloud-wal-archive`.
2153
2154 References: BAR-265, BAR-423, BAR-264.
2155
2156 - Improve WAL upload performance on S3 buckets by avoiding multipart uploads
2157
2158 Previously, WAL files were being uploaded to S3 buckets using multipart uploads
2159 provided by the boto3 library via the `upload_fileobj` method. It was noticed that
2160 multipart upload is slower when used for small files, such as WAL segments,
2161 compared to when uploading it in a single PUT request.
2162 This has been improved by avoiding multipart uploads for files smaller than 100MB.
2163 The average upload time of each WAL file is expected to be reduced by around 15%
2164 with this change.
2165
2166 References: BAR-374.
2167
2168 - Modify behavior when enforcing retention policy for `KEEP:STANDALONE` full backups
2169
2170 When enforcing the retention policy on full backups created with
2171 `backup_method = postgres`, Barman was previously marking all dependent (child)
2172 incremental backups as `VALID`, regardless of the KEEP target used. However, this
2173 approach is incorrect:
2174
2175 - For backups labeled `KEEP:STANDALONE`, Barman only retains the WAL files needed to
2176 restore the server to the exact state of that backup. Because these backups are
2177 self-contained, any dependent child backups are no longer needed once the root
2178 backup is outside the retention policy.
2179
2180 - In contrast, backups marked `KEEP:FULL` are intended for point-in-time recovery.
2181 To support this, Barman retains all WALs, as well as any child backups, to ensure
2182 the backup's consistency and allow recovery to the latest possible point.
2183
2184 This distinction ensures that `KEEP:STANDALONE` backups serve as snapshots of a
2185 specific moment, while `KEEP:FULL` backups retain everything needed for full
2186 point-in-time recovery.
2187
2188 References: BAR-366.
2189
2190 - Update documentation and user-facing features for Barman's recovery process.
2191
2192 Barman docs and the tool itself used to use the terms "recover"/"recovery" both for
2193 referencing:
2194
2195 - The Postgres recovery process;
2196 - The process of restoring a backup and preparing it for recovery.
2197
2198 Both the code and documentation have been revised to accurately reflect the usage of
2199 the terms "restore" and "recover"/"recovery".
2200
2201 Also, the `barman recover` command was renamed to `barman restore`. The old name is
2202 still kept as an alias for backward compatibility.
2203
2204 References: BAR-337.
2205
2206 - Add --keep-compression flag to barman-wal-restore and get-wal
2207
2208 A new `--keep-compression` option has been added to both `barman-wal-restore` and
2209 `get-wal`. This option controls whether compressed WAL files should be decompressed
2210 on the Barman server before being fetched. When specified with `get-wal`, default
2211 decompression is skipped, and the output is the WAL file content in its original
2212 state. When specified with `barman-wal-restore`, the WAL file is fetched as-is and,
2213 if compressed, decompressed on the client side.
2214
2215 References: BAR-435.
2216
2217 - Ransomware protection - Add AWS Snapshot Lock Support
2218
2219 Barman now supports AWS EBS Snapshot Lock, a new integrated feature to prevent
2220 accidental or malicious deletions of Amazon EBS snapshots. When a snapshot is
2221 locked, it can't be deleted by any user but remains fully accessible for use. This
2222 feature enables you to store snapshots in WORM (Write-Once-Read-Many) format for a
2223 specified duration, helping to meet regulatory requirements by keeping the data
2224 secure and tamper-proof until the lock expires.
2225
2226 Special thanks to Rui Marinho, our community contributor who started this feature.
2227
2228 References: BAR-242.
2229
2230 - Prevent orphan files from being left from a crash while deleting a backup
2231
2232 This commit fixes an issue where backups could leave behind files if the system
2233 crashed during the deletion of a backup.
2234
2235 Now, when a backup is deleted, it will get a "delete marker" at the start.
2236 If a crash happens while the backup is being deleted, the marker will help
2237 recognize incomplete backup removals when the server restarts.
2238
2239 The Barman cron job has been updated to look for these deleted markers. If it finds
2240 a backup with a "delete marker", it will complete the process.
2241
2242 References: BAR-244.
2243
2244 - Add support for using tags with snapshots
2245
2246 Barman now supports tagging the snapshots when creating backups using the
2247 barman-cloud-backup script command. A new argument called --tags was added.
2248
2249 Special thanks to Rui Marinho, our community contributor who started this feature.
2250
2251 References: BAR-417.
2252
2253 - Use ISO format instead of ctime when producing JSON output of Barman cloud commands
2254
2255 The ctime format has no information about the time zone associated with the timestamp.
2256 Besides that, that format is better suited for human consumption. For machine
2257 consumption the ISO format is better suited.
2258
2259 References: BAR-316.
2260
2261 ### Bugfixes
2262
2263 - Fix barman check which returns wrong results for Replication Slot
2264
2265 Previously, when using architectures which backup from a standby node and stream WALs
2266 from the primary, Barman would incorrectly use `conninfo` (pointing to a standby server)
2267 for replication checks, leading to errors such as:
2268
2269 `replication slot (WAL streaming): FAILED (replication slot 'barman' doesn't exist.
2270 Please execute 'barman receive-wal --create-slot pg17')`
2271
2272 This fixes the following issue
2273 [#1024](https://github.com/EnterpriseDB/barman/issues/1024) by ensuring
2274 `wal_conninfo` is used for WAL replication checks if it's set.
2275
2276 `wal_conninfo` takes precedence over `wal_streaming_conninfo`, when both are set.
2277 With this change, if only `wal_conninfo` is set, it will be used and will not fall
2278 back to `conninfo`.
2279
2280 Also, in the documentation, changes were made so it is explicit that when `conninfo`
2281 points to a standby server, `wal_conninfo` must be set and used for accurate
2282 replication status checks.
2283
2284 References: BAR-409.
2285
2286 - Fix missing options for `barman keep`
2287
2288 The error message that the Barman CLI emitted when running `barman keep`
2289 without any options suggested there were shortcut aliases for status and
2290 release. These aliases, -s and -r, do not exist, so the error message was
2291 misleading.
2292 This fixes the issue by including these short options in the Barman CLI,
2293 aligning it with other tools like `barman-cloud-backup-keep`, where these
2294 shortcuts already exist.
2295
2296 References: BAR-356.
2297
2298 - Lighten standby checks related to conninfo and primary_conninfo
2299
2300 When backing up a standby server, Barman performs some checks to assert
2301 that `conninfo` is really pointing to a standby (in recovery mode) and
2302 that `primary_conninfo` is pointing to a primary (not in recovery).
2303
2304 The problem, as reported in the issues #704 and #744, is that when a
2305 failover occurs, the `conninfo` will now be pointing to a primary
2306 instead and the checks will start failing, requiring the user to change
2307 Barman configs manually whenever a failover occurs.
2308
2309 This fix solved the issue by making such checks non-critical, which
2310 means they will still fail but Barman will keep operating regardless.
2311 Essentially, Barman will ignore `primary_conninfo` if `conninfo` does
2312 not point to a standby. Warnings about this misconfiguration will also
2313 be emitted whenever running any Barman command so the user can be aware.
2314
2315 References: BAR-348.
2316
2317 - Check for USAGE instead of MEMBER when calling pg_has_role in Barman
2318
2319 To work correctly Barman database user needs to be included in some roles. Barman was
2320 verifying the conditions was satisfied by calling `pg_has_role` in Postgres. However,
2321 it was check for the `MEMBER` privilege instead of `USAGE`. This oversight was fixed.
2322
2323 This change is a contribution from @RealGreenDragon.
2324
2325 References: BAR-489.
2326
2327 ## 3.11.1 (2024-08-22)
2328
2329 ### Bugfixes
2330
2331 - Fix failures in `barman-cloud-backup-delete`. This command was failing when
2332 applying retention policies due to a bug introduced by the previous release.
2333
2334 ## 3.11.0 (2024-08-22)
2335
2336 ### Notable changes
2337
2338 - Add support for Postgres 17+ incremental backups. This major feature is
2339 composed of several small changes:
2340
2341 - Add `--incremental` command-line option to `barman backup` command. This is
2342 used to specify the parent backup when taking an incremental backup. The
2343 parent can be either a full backup or another incremental backup.
2344
2345 - Add `latest-full` shortcut backup ID. Along with `latest`, this can be used
2346 as a shortcut to select the parent backup for an incremental backup. While
2347 `latest` takes the latest backup independently if it is full or incremental,
2348 `latest-full` takes the latest full backup.
2349
2350 - `barman keep` command can only be applied to full backups when
2351 `backup_method = postgres`.
2352
2353 - Retention policies do not take incremental backups into consideration. As
2354 incremental backups cannot be recovered without having the complete chain of
2355 backups available up to the full backup, only full backups account for
2356 retention policies. If a full backup has dependent incremental backups and the
2357 retention policy is applied, the full backup will propagate its status to the
2358 associated incremental backups. When the full backup is flagged with any `KEEP`
2359 target, Barman will set the status of all related incremental backups to `VALID`.
2360
2361 - When deleting a backup all the incremental backups depending on it, if any,
2362 are also removed.
2363
2364 - `barman recover` needs to combine the full backup with the chain of incremental
2365 backups when recovering. The new CLI option `--local-staging-path`, and the
2366 corresponding `local_staging_path` configuration option, are used to specify
2367 the path in the Barman host where the backups will be combined when recovering
2368 an incremental backup.
2369
2370 - Changes to `barman show-backup` output:
2371
2372 - Add the “Estimated cluster size” field. It's useful to have an estimation
2373 of the data directory size of a cluster when restoring a backup. It’s
2374 particularly useful when recovering compressed backups or incremental
2375 backups, situations where the size of the backup doesn’t reflect the size of the
2376 data directory in Postgres. In JSON format, this is stored as
2377 `cluster_size`.
2378
2379 - Add the “WAL summarizer” field. This field shows if `summarize_wal` was
2380 enabled in Postgres at the time the backup was taken. In JSON format, this
2381 is stored as `server_information.summarize_wal`. This field is omitted for
2382 Postgres 16 and older.
2383
2384 - Add “Data checksums” field. This shows if `data_checkums` was enabled in
2385 Postgres at the time the backup was taken. In JSON format, this is stored as
2386 `server_information.data_checksums`.
2387
2388 - Add the “Backup method” field. This shows the backup method used for this
2389 backup. In JSON format, this is stored as
2390 `base_backup_information.backup_method`.
2391
2392 - Rename the field “Disk Usage” as “Backup Size”. The latter provides a more
2393 comprehensive name which represents the size of the backup in the Barman
2394 host. The JSON field under `base_backup_information` was also renamed from
2395 `disk_usage` to `backup_size`.
2396
2397 - Add the “WAL size” field. This shows the size of the WALs required by the
2398 backup. In JSON format, this is stored as
2399 `base_backup_information.wal_size`.
2400
2401 - Refactor the field “Incremental size”. It is now named “Resources saving”
2402 and it now shows an estimation of resources saved when taking incremental
2403 backups with `rsync` or `pg_basebackup`. It compares the backup size with
2404 the estimated cluster size to estimate the amount of disk and network
2405 resources that were saved by taking an incremental backup. In JSON format,
2406 the field was renamed from `incremental_size` to `resource_savings` under
2407 `base_backup_information`.
2408
2409 - Add the `system_id` field to the JSON document. This field contains the
2410 system identifier of Postgres. It was present in console format, but was
2411 missing in JSON format.
2412
2413 - Add fields related with Postgres incremental backups:
2414
2415 - “Backup type”: indicates if the Postgres backup is full or incremental. In
2416 JSON format, this is stored as `backup_type` under `base_backup_information`.
2417
2418 - “Root backup”: the ID of the full backup that is the root of a chain of
2419 one or more incremental backups. In JSON format, this is stored as
2420 `catalog_information.root_backup_id`.
2421
2422 - “Parent backup”: the ID of the full or incremental backup from which this
2423 incremental backup was taken. In JSON format, this is stored as
2424 `catalog_information.parent_backup_id`.
2425
2426 - “Children Backup(s)”: the IDs of the incremental backups that were taken
2427 with this backup as the parent. In JSON format, this is stored as
2428 `catalog_information.children_backup_ids`.
2429
2430 - “Backup chain size”: the number of backups in the chain from this
2431 incremental backup up to the root backup. In JSON format, this is
2432 stored as `catalog_information.chain_size`.
2433
2434 - Changes to `barman list-backup` output:
2435
2436 - It now includes the backup type in the JSON output, which can be either
2437 `rsync` for backups taken with rsync, `full` or `incremental` for backups
2438 taken with `pg_basebackup`, or `snapshot` for cloud snapshots. When printing
2439 to the console the backup type is represented by the corresponding labels
2440 `R`, `F`, `I` or `S`.
2441
2442 - Remove tablespaces information from the output. That was bloating the
2443 output. Tablespaces information can still be found in the output of
2444 `barman show-backup`.
2445
2446 - Always set a timestamp with a time zone when configuring
2447 `recovery_target_time` through `barman recover`. Previously, if no time zone
2448 was explicitly set through `--target-time`, Barman would configure
2449 `recovery_target_time` without a time zone in Postgres. Without a time zone,
2450 Postgres would assume whatever is configured through `timezone` GUC in
2451 Postgres. From now on Barman will issue a warning and configure
2452 `recovery_target_time` with the time zone of the Barman host if no time zone
2453 is set by the user through `--target-time` option.
2454
2455 - When recovering a backup with the “no get wal” approach and `--target-lsn` is set,
2456 copy only the WAL files required to reach the configured target. Previously
2457 Barman would copy all the WAL files from its archive to Postgres.
2458
2459 - When recovering a backup with the “no get wal” approach and `--target-immediate`
2460 is set, copy only the WAL files required to reach the consistent point.
2461 Previously Barman would copy all the WAL files from its archive to Postgres.
2462
2463 - `barman-wal-restore` now moves WALs from the spool directory to `pg_wal`
2464 instead of copying them. This can improve performance if the spool directory
2465 and the `pg_wal` directory are in the same partition.
2466
2467 - `barman check-backup` now shows the reason why a backup was marked as `FAILED`
2468 in the output and logs. Previously for a user to know why the backup was
2469 marked as `FAILED`, they would need to run `barman show-backup` command.
2470
2471 - Add configuration option `aws_await_snapshots_timeout` and the corresponding
2472 `--aws-await-snapshots-timeout` command-line option on `barman-cloud-backup`.
2473 This specifies the timeout in seconds to wait for snapshot backups to reach
2474 the completed state.
2475
2476 - Add a keep-alive mechanism to rsync-based backups. Previously the Postgres
2477 session created by Barman to run `pg_backup_start()` and `pg_backup_stop()` would
2478 stay idle for as long as the base backup copy would take. That could lead to a
2479 firewall or router dropping the connection because it was idle for a long
2480 time. The keep-alive mechanism sends heartbeat queries to Postgres
2481 through that connection, thus reducing the likelihood of a connection
2482 getting dropped. The interval between heartbeats can be controlled through the new
2483 configuration option `keepalive_interval` and the corresponding CLI
2484 option `--keepalive-interval` of the `barman backup` command.
2485
2486 ### Bugfixes
2487
2488 - When recovering a backup with the “no get wal” approach and `--target-time`
2489 set, copy all WAL files. Previously Barman would attempt to “guess” the WAL
2490 files required by Postgres to reach the configured target time. However,
2491 the mechanism was not robust enough as it was based on the stats of the WAL
2492 file in the Barman host (more specifically the creation time). For example:
2493 if there were archiving or streaming lag between Postgres and Barman, that
2494 could be enough for recovery to fail because Barman would miss to copy all
2495 the required WAL files due to the weak check based on file stats.
2496
2497 - Pin `python-snappy` to `0.6.1` when running Barman through Python 3.6 or
2498 older. Newer versions of `python-snappy` require `cramjam` version `2.7.0` or
2499 newer, and these are only available for Python 3.7 or newer.
2500
2501 - `barman receive-wal` now exits with code `1` instead of `0` in the following
2502 cases:
2503
2504 - Being unable to run with `--reset` flag because `pg_receivewal` is
2505 running.
2506
2507 - Being unable to start `pg_receivewal` process because it is already
2508 running.
2509
2510 - Fix and improve information about Python in `barman diagnose` output:
2511
2512 - The command now makes sure to use the same Python interpreter under which
2513 Barman is installed when outputting the Python version through
2514 `python_ver` JSON key. Previously, if an environment had multiple Python
2515 installations and/or virtual environments, the output could eventually be
2516 misleading, as it could be fetched from a different Python interpreter.
2517
2518 - Added a `python_executable` key to the JSON output. That contains the path
2519 to the exact Python interpreter being used by Barman.
2520
2521 ## 3.10.1 (2024-06-12)
2522
2523 ### Bugfixes
2524
2525 - Make `argcomplete` optional to avoid installation issues on some
2526 platforms.
2527 - Load `barman.auto.conf` only when the file exists.
2528 - Emit a warning when the `cfg_changes.queue` file is malformed.
2529 - Correct in documentation the postgresql version where
2530 `pg_checkpoint` is available.
2531 - Add `--no-partial` option to `barman-cloud-wal-restore`.
2532
2533 ## 3.10.0 (2024-01-24)
2534
2535 ### Notable changes
2536
2537 - Limit the average bandwidth used by `barman-cloud-backup` when backing
2538 up to either AWS S3 or Azure Blob Storage according to the value set by
2539 a new CLI option `--max-bandwidth`.
2540
2541 - Add the new configuration option `lock_directory_cleanup`
2542 That enables cron to automatically clean up the barman_lock_directory
2543 from unused lock files.
2544
2545 - Add support for a new type of configuration called `model`.
2546 The model acts as a set of overrides for configuration options
2547 for a given Barman server.
2548
2549 - Add a new barman command `barman config-update` that allows the creation
2550 and the update of configurations using JSON
2551
2552 ### Bugfixes
2553
2554 - Fix a bug that caused `--min-chunk-size` to be ignored when using
2555 barman-cloud-backup as hook script in Barman.
2556
2557 ## 3.9.0 (2023-10-03)
2558
2559 ### Notable changes
2560
2561 - Allow `barman switch-wal --force` to be run against PG>=14 if the
2562 user has the `pg_checkpoint` role (thanks to toydarian for this patch).
2563
2564 - Log the current check at `info` level when a check timeout occurs.
2565
2566 - The minimum size of an upload chunk when using `barman-cloud-backup`
2567 with either S3 or Azure Blob Storage can now be specified using the
2568 `--min-chunk-size` option.
2569
2570 - `backup_compression = none` is supported when using `pg_basebackup`.
2571
2572 - For PostgreSQL 15 and later: the allowed `backup_compression_level`
2573 values for `zstd` and `lz4` have been updated to match those allowed by
2574 `pg_basebackup`.
2575
2576 - For PostgreSQL versions earlier than 15: `backup_compression_level = 0`
2577 can now be used with `backup_compression = gzip`.
2578
2579 ### Bugfixes
2580
2581 - Fix `barman recover` on platforms where Multiprocessing uses spawn by
2582 default when starting new processes.
2583
2584 ## 3.8.0 (2023-08-31)
2585
2586 ### Notable changes
2587
2588 - Clarify package installation. barman is packaged with default python version
2589 for each operating system.
2590
2591 - The `minimum-redundancy` option is added to `barman-cloud-backup-delete`.
2592 It allows to set the minimum number of backups that should always be available.
2593
2594 - Add a new `primary_checkpoint_timeout` configuration option. Allows define
2595 the amount of seconds that Barman will wait at the end of a backup if no
2596 new WAL files are produced, before forcing a checkpoint on the primary server.
2597
2598 ### Bugfixes
2599
2600 - Fix race condition in barman retention policies application. Backup
2601 deletions will now raise a warning if another deletion is in progress
2602 for the requested backup.
2603
2604 - Fix `barman-cloud-backup-show` man page installation.
2605
2606 ## 3.7.0 (2023-07-25)
2607
2608 ### Notable changes
2609
2610 - Support is added for snapshot backups on AWS using EBS volumes.
2611
2612 - The `--profile` option in the `barman-cloud-*` scripts is renamed
2613 `--aws-profile`. The old name is deprecated and will be removed in
2614 a future release.
2615
2616 - Backup manifests can now be generated automatically on completion
2617 of a backup made with `backup_method = rsync`. This is enabled by
2618 setting the `autogenerate_manifest` configuration variable and can
2619 be overridden using the `--manifest` and `--no-manifest` CLI options.
2620
2621 ### Bugfixes
2622
2623 - The `barman-cloud-*` scripts now correctly use continuation
2624 tokens to page through objects in AWS S3-compatible object
2625 stores. This fixes a bug where `barman-cloud-backup-delete`
2626 would only delete the oldest 1000 eligible WALs after backup
2627 deletion.
2628
2629 - Minor documentation fixes.
2630
2631 ## 3.6.0 (2023-06-15)
2632
2633 ### Notable changes
2634
2635 - PostgreSQL version 10 is no longer supported.
2636
2637 - Support is added for snapshot backups on Microsoft Azure using
2638 Managed Disks.
2639
2640 - The `--snapshot-recovery-zone` option is renamed `--gcp-zone` for
2641 consistency with other provider-specific options. The old name
2642 is deprecated and will be removed in a future release.
2643
2644 - The `snapshot_zone` option and `--snapshot-zone` argument are
2645 renamed `gcp_zone` and `--gcp-zone` respectively. The old names
2646 are deprecated and will be removed in a future release.
2647
2648 - The `snapshot_gcp_project` option and `--snapshot-gcp-project`
2649 argument are renamed to `gcp_project` and `--gcp-project`. The
2650 old names are deprecated and will be removed in a future release.
2651
2652 ### Bugfixes
2653
2654 - Barman will no longer attempt to execute the `replication-status`
2655 command for a passive node.
2656
2657 - The `backup_label` is deleted from cloud storage when a
2658 snapshot backup is deleted with `barman-cloud-backup-delete`.
2659
2660 - Man pages for the `generate-manifest` and `verify-backup`
2661 commands are added.
2662
2663 - Minor documentation fixes.
2664
2665 ## 3.5.0 (2023-03-29)
2666
2667 ### Notable changes
2668
2669 - Python 2.7 is no longer supported. The earliest Python version
2670 supported is now 3.6.
2671
2672 - The `barman`, `barman-cli` and `barman-cli-cloud` packages for
2673 EL7 now require python 3.6 instead of python 2.7. For other
2674 supported platforms, Barman packages already require python
2675 versions 3.6 or later so packaging is unaffected.
2676
2677 - Support for PostgreSQL 10 will be discontinued in future Barman
2678 releases; 3.5.x is the last version of Barman with support for
2679 PostgreSQL 10.
2680
2681 - Backups and WALs uploaded to Google Cloud Storage can now be
2682 encrypted using a specific KMS key by using the `--kms-key-name`
2683 option with `barman-cloud-backup` or `barman-cloud-wal-archive`.
2684
2685 - Backups and WALs uploaded to AWS S3 can now be encrypted using a
2686 specific KMS key by using the `--sse-kms-key-id` option with
2687 `barman-cloud-backup` or `barman-cloud-wal-archive` along with
2688 `--encryption=aws:kms`.
2689
2690 - Two new configuration options are provided which make it possible
2691 to limit the rate at which parallel workers are started during
2692 backups with `backup_method = rsync` and recoveries.
2693 `parallel_jobs_start_batch_size` can be set to limit the amount of
2694 parallel workers which will be started in a single batch, and
2695 `parallel_jobs_start_batch_period` can be set to define the time
2696 in seconds over which a single batch of workers will be started.
2697 These can be overridden using the arguments `--jobs-start-batch-size`
2698 and `--jobs-start-batch-period` with the `barman backup` and
2699 `barman recover` commands.
2700
2701 - A new option `--recovery-conf-filename` is added to `barman recover`.
2702 This can be used to change the file to which Barman should write the
2703 PostgreSQL recovery options from the default `postgresql.auto.conf`
2704 to an alternative location.
2705
2706 ### Bugfixes
2707
2708 - Fix a bug which prevented `barman-cloud-backup-show` from
2709 displaying the backup metadata for backups made with
2710 `barman backup` and uploaded by `barman-cloud-backup` as a
2711 post-backup hook script.
2712
2713 - Fix a bug where the PostgreSQL connection used to validate backup
2714 compression settings was left open until termination of the
2715 Barman command.
2716
2717 - Fix an issue which caused rsync-concurrent backups to fail when
2718 running for a duration greater than `idle_session_timeout`.
2719
2720 - Fix a bug where the backup name was not saved in the backup
2721 metadata if the `--wait` flag was used with `barman backup`.
2722
2723 - Thanks to mojtabash78, mhkarimi1383, epolkerman, barthisrael and
2724 hzetters for their contributions.
2725
2726 ## 3.4.0 (2023-01-26)
2727
2728 ### Notable changes
2729
2730 - This is the last release of Barman which will support Python 2 and
2731 new features will henceforth require Python 3.6 or later.
2732
2733 - A new `backup_method` named `snapshot` is added. This will create
2734 backups by taking snapshots of cloud storage volumes. Currently
2735 only Google Cloud Platform is supported however support for AWS
2736 and Azure will follow in future Barman releases. Note that this
2737 feature requires a minimum Python version of 3.7. Please see the
2738 Barman manual for more information.
2739
2740 - Support for snapshot backups is also added to `barman-cloud-backup`,
2741 with minimal support for restoring a snapshot backup added to
2742 `barman-cloud-restore`.
2743
2744 - A new command `barman-cloud-backup-show` is added which displays
2745 backup metadata stored in cloud object storage and is analogous to
2746 `barman show-backup`. This is provided so that snapshot metadata
2747 can be easily retrieved at restore time however it is also a
2748 convenient way of inspecting metadata for any backup made with
2749 `barman-cloud-backup`.
2750
2751 - The instructions for installing Barman from RPMs in the docs are
2752 updated.
2753
2754 - The formatting of NFS requirements in the docs is fixed.
2755
2756 - Supported PostgreSQL versions are updated in the docs (this is a
2757 documentation fix only - the minimum supported major version is
2758 still 10).
2759
2760 ## 3.3.0 (2022-12-14)
2761
2762 ### Notable changes
2763
2764 - A backup can now be given a name at backup time using the new
2765 `--name` option supported by the `barman backup` and
2766 `barman-cloud-backup` commands. The backup name can then be used
2767 in place of the backup ID when running commands to interact with
2768 backups. Additionally, the commands to list and show backups have
2769 been been updated to include the backup name in the plain text and
2770 JSON output formats.
2771
2772 - Stricter checking of PostgreSQL version to verify that Barman is
2773 running against a supported version of PostgreSQL.
2774
2775 ### Bugfixes
2776
2777 - Fix inconsistencies between the barman cloud command docs and
2778 the help output for those commands.
2779
2780 - Use a new PostgreSQL connection when switching WALs on the
2781 primary during the backup of a standby to avoid undefined
2782 behaviour such as `SSL error` messages and failed connections.
2783
2784 - Reduce log volume by changing the default log level of stdout
2785 for commands executed in child processes to `DEBUG` (with the
2786 exception of `pg_basebackup` which is deliberately logged at
2787 `INFO` level due to it being a long-running process where it is
2788 frequently useful to see the output during the execution of the
2789 command).
2790
2791 ## 3.2.0 (2022-10-20)
2792
2793 ### Notable changes
2794
2795 - `barman-cloud-backup-delete` now accepts a `--batch-size` option
2796 which determines the maximum number of objects deleted in a single
2797 request.
2798
2799 - All `barman-cloud-*` commands now accept a `--read-timeout` option
2800 which, when used with the `aws-s3` cloud provider, determines the
2801 read timeout used by the boto3 library when making requests to S3.
2802
2803 ### Bugfixes
2804
2805 - Fix the failure of `barman recover` in cases where
2806 `backup_compression` is set in the Barman configuration but the
2807 PostgreSQL server is unavailable.
2808
2809 ## 3.1.0 (2022-09-14)
2810
2811 ### Notable changes
2812
2813 - Backups taken with `backup_method = postgres` can now be compressed
2814 using lz4 and zstd compression by setting `backup_compression = lz4`
2815 or `backup_compression = zstd` respectively. These options are only
2816 supported with PostgreSQL 15 (beta) or later.
2817
2818 - A new option `backup_compression_workers` is available which sets
2819 the number of threads used for parallel compression. This is
2820 currently only available with `backup_method = postgres` and
2821 `backup_compression = zstd`.
2822
2823 - A new option `primary_conninfo` can be set to avoid the need for
2824 backups of standbys to wait for a WAL switch to occur on the primary
2825 when finalizing the backup. Barman will use the connection string
2826 in `primary_conninfo` to perform WAL switches on the primary when
2827 stopping the backup.
2828
2829 - Support for certain Rsync versions patched for CVE-2022-29154 which
2830 require a trailing newline in the `--files-from` argument.
2831
2832 - Allow `barman receive-wal` maintenance options (`--stop`, `--reset`,
2833 `--drop-slot` and `--create-slot`) to run against inactive servers.
2834
2835 - Add `--port` option to `barman-wal-archive` and `barman-wal-restore`
2836 commands so that a custom SSH port can be used without requiring any
2837 SSH configuration.
2838
2839 - Various documentation improvements.
2840
2841 - Python 3.5 is no longer supported.
2842
2843 ### Bugfixes
2844
2845 - Ensure PostgreSQL connections are closed cleanly during the
2846 execution of `barman cron`.
2847
2848 - `barman generate-manifest` now treats pre-existing
2849 backup_manifest files as an error condition.
2850
2851 - backup_manifest files are renamed by appending the backup ID
2852 during recovery operations to prevent future backups including
2853 an old backup_manifest file.
2854
2855 - Fix epoch timestamps in json output which were not
2856 timezone-aware.
2857
2858 - The output of `pg_basebackup` is now written to the Barman
2859 log file while the backup is in progress.
2860
2861 - We thank barthisrael, elhananjair, kraynopp, lucianobotti, and mxey
2862 for their contributions to this release.
2863
2864 ## 3.0.1 (2022-06-27)
2865
2866 ### Bugfixes
2867
2868 - Fix package signing issue in PyPI (same sources as 3.0.0)
2869
2870 ## 3.0.0 (2022-06-23)
2871
2872 ### Breaking changes
2873
2874 - PostgreSQL versions 9.6 and earlier are no longer
2875 supported. If you are using one of these versions you will need to
2876 use an earlier version of Barman.
2877
2878 - The default backup mode for Rsync backups is now
2879 concurrent rather than exclusive. Exclusive backups have been
2880 deprecated since PostgreSQL 9.6 and have been removed in PostgreSQL
2881 15. If you are running Barman against PostgreSQL versions earlier
2882 than 15 and want to use exclusive backups you will now need to set
2883 `exclusive_backup` in `backup_options`.
2884
2885 - The backup metadata stored in the `backup.info` file
2886 for each backup has an extra field. This means that earlier versions
2887 of Barman will not work in the presence of any backups taken with
2888 3.0.0. Additionally, users of pg-backup-api will need to upgrade it
2889 to version 0.2.0 so that pg-backup-api can work with the updated
2890 metadata.
2891
2892 ### Notable changes
2893
2894 - Backups taken with `backup_method = postgres` can now be compressed
2895 by pg_basebackup by setting the `backup_compression` config option.
2896 Additional options are provided to control the compression level,
2897 the backup format and whether the pg_basebackup client or the
2898 PostgreSQL server applies the compression. NOTE: Recovery of these
2899 backups requires Barman to stage the compressed files on the recovery
2900 server in a location specified by the `recovery_staging_path` option.
2901
2902 - Add support for PostgreSQL 15. Exclusive backups are not supported
2903 by PostgreSQL 15 therefore Barman configurations for PostgreSQL 15
2904 servers are not allowed to specify `exclusive_backup` in
2905 `backup_options`.
2906
2907 - Use custom_compression_magic, if set, when identifying compressed
2908 WAL files. This allows Barman to correctly identify uncompressed
2909 WALs (such as `*.partial` files in the `streaming` directory) and
2910 return them instead of attempting to decompress them.
2911
2912 ### Minor changes
2913
2914 - Various documentation improvements.
2915
2916 ### Bugfixes
2917
2918 - Fix an ordering bug which caused Barman to log the message
2919 "Backup failed issuing start backup command." while handling a
2920 failure in the stop backup command.
2921
2922 - Fix a bug which prevented recovery using `--target-tli` when
2923 timelines greater than 9 were present, due to hexadecimal values
2924 from WAL segment names being parsed as base 10 integers.
2925
2926 - Fix an import error which occurs when using barman cloud with
2927 certain python2 installations due to issues with the enum34
2928 dependency.
2929
2930 - Fix a bug where Barman would not read more than three bytes from
2931 a compressed WAL when attempting to identify the magic bytes. This
2932 means that any custom compressed WALs using magic longer than three
2933 bytes are now decompressed correctly.
2934
2935 - Fix a bug which caused the `--immediate-checkpoint` flag to be
2936 ignored during backups with `backup_method = rsync`.
2937
2938 ## 2.19 (2022-03-09)
2939
2940 ### Notable changes
2941
2942 - Change `barman diagnose` output date format to ISO8601.
2943
2944 - Add Google Cloud Storage (GCS) support to barman cloud.
2945
2946 - Support `current` and `latest` recovery targets for the `--target-tli`
2947 option of `barman recover`.
2948
2949 - Add documentation for installation on SLES.
2950
2951 ### Bugfixes
2952
2953 - `barman-wal-archive --test` now returns a non-zero exit code when
2954 an error occurs.
2955
2956 - Fix `barman-cloud-check-wal-archive` behaviour when `-t` option is
2957 used so that it exits after connectivity test.
2958
2959 - `barman recover` now continues when `--no-get-wal` is used and
2960 `"get-wal"` is not set in `recovery_options`.
2961
2962 - Fix `barman show-servers --format=json ${server}` output for
2963 inactive server.
2964
2965 - Check for presence of `barman_home` in configuration file.
2966
2967 - Passive barman servers will no longer store two copies of the
2968 tablespace data when syncing backups taken with
2969 `backup_method = postgres`.
2970
2971 - We thank richyen for his contributions to this release.
2972
2973 ## 2.18 (2022-01-21)
2974
2975 ### Notable changes
2976
2977 - Add snappy compression algorithm support in barman cloud (requires the
2978 optional python-snappy dependency).
2979
2980 - Allow Azure client concurrency parameters to be set when uploading
2981 WALs with barman-cloud-wal-archive.
2982
2983 - Add `--tags` option in barman cloud so that backup files and archived
2984 WALs can be tagged in cloud storage (aws and azure).
2985
2986 - Update the barman cloud exit status codes so that there is a dedicated
2987 code (2) for connectivity errors.
2988
2989 - Add the commands `barman verify-backup` and `barman generate-manifest`
2990 to check if a backup is valid.
2991
2992 - Add support for Azure Managed Identity auth in barman cloud which can
2993 be enabled with the `--credential` option.
2994
2995 ### Bugfixes
2996
2997 - Change `barman-cloud-check-wal-archive` behavior when bucket does
2998 not exist.
2999
3000 - Ensure `list-files` output is always sorted regardless of the
3001 underlying filesystem.
3002
3003 - Man pages for barman-cloud-backup-keep, barman-cloud-backup-delete
3004 and barman-cloud-check-wal-archive added to Python packaging.
3005
3006 - We thank richyen and stratakis for their contributions to this
3007 release.
3008
3009 ## 2.17 (2021-12-01)
3010
3011 ### Notable changes
3012
3013 - Resolves a performance regression introduced in version 2.14 which
3014 increased copy times for `barman backup` or `barman recover` commands
3015 when using the `--jobs` flag.
3016
3017 - Ignore rsync partial transfer errors for `sender` processes so that
3018 such errors do not cause the backup to fail (thanks to barthisrael).
3019
3020 ## 2.16 (2021-11-17)
3021
3022 ### Notable changes
3023
3024 - Add the commands `barman-check-wal-archive` and `barman-cloud-check-wal-archive`
3025 to validate if a proposed archive location is safe to use for a new PostgreSQL
3026 server.
3027
3028 - Allow Barman to identify WAL that's already compressed using a custom
3029 compression scheme to avoid compressing it again.
3030
3031 - Add `last_backup_minimum_size` and `last_wal_maximum_age` options to
3032 `barman check`.
3033
3034 ### Bugfixes
3035
3036 - Use argparse for command line parsing instead of the unmaintained
3037 argh module.
3038
3039 - Make timezones consistent for `begin_time` and `end_time`.
3040
3041 - We thank chtitux, George Hansper, stratakis, Thoro, and vrms for their
3042 contributions to this release.
3043
3044 ## 2.15 (2021-10-12)
3045
3046 ### Notable changes
3047
3048 - Add plural forms for the `list-backup`, `list-server` and
3049 `show-server` commands which are now `list-backups`, `list-servers`
3050 and `show-servers`. The singular forms are retained for backward
3051 compatibility.
3052
3053 - Add the `last-failed` backup shortcut which references the newest
3054 failed backup in the catalog so that you can do:
3055
3056 - `barman delete <SERVER> last-failed`
3057
3058 ### Bugfixes
3059
3060 - Tablespaces will no longer be omitted from backups of EPAS
3061 versions 9.6 and 10 due to an issue detecting the correct version
3062 string on older versions of EPAS.
3063
3064 ## 2.14 (2021-09-22)
3065
3066 ### Notable changes
3067
3068 - Add the `barman-cloud-backup-delete` command which allows backups in
3069 cloud storage to be deleted by specifying either a backup ID or a
3070 retention policy.
3071
3072 - Allow backups to be retained beyond any retention policies in force by
3073 introducing the ability to tag existing backups as archival backups
3074 using `barman keep` and `barman-cloud-backup-keep`.
3075
3076 - Allow the use of SAS authentication tokens created at the restricted
3077 blob container level (instead of the wider storage account level) for
3078 Azure blob storage
3079
3080 - Significantly speed up `barman restore` into an empty directory for
3081 backups that contain hundreds of thousands of files.
3082
3083 ### Bugfixes
3084
3085 - The backup privileges check will no longer fail if the user lacks
3086 "userepl" permissions and will return better error messages if any
3087 required permissions are missing (#318 and #319).
3088
3089 ## 2.13 (2021-07-26)
3090
3091 ### Notable changes
3092
3093 - Add Azure blob storage support to barman-cloud
3094
3095 - Support tablespace remapping in barman-cloud-restore via
3096 `--tablespace name:location`
3097
3098 - Allow barman-cloud-backup and barman-cloud-wal-archive to run as
3099 Barman hook scripts, to allow data to be relayed to cloud storage
3100 from the Barman server
3101
3102 ### Bugfixes
3103
3104 - Stop backups failing due to idle_in_transaction_session_timeout
3105 <https://github.com/EnterpriseDB/barman/issues/333>
3106
3107 - Fix a race condition between backup and archive-wal in updating
3108 xlog.db entries (#328)
3109
3110 - Handle PGDATA being a symlink in barman-cloud-backup, which led to
3111 "seeking backwards is not allowed" errors on restore (#351)
3112
3113 - Recreate pg_wal on restore if the original was a symlink (#327)
3114
3115 - Recreate pg_tblspc symlinks for tablespaces on restore (#343)
3116
3117 - Make barman-cloud-backup-list skip backups it cannot read, e.g.,
3118 because they are in Glacier storage (#332)
3119
3120 - Add `-d database` option to barman-cloud-backup to specify which
3121 database to connect to initially (#307)
3122
3123 - Fix "Backup failed uploading data" errors from barman-cloud-backup
3124 on Python 3.8 and above, caused by attempting to pickle the boto3
3125 client (#361)
3126
3127 - Correctly enable server-side encryption in S3 for buckets that do
3128 not have encryption enabled by default.
3129
3130 In Barman 2.12, barman-cloud-backup's `--encryption` option did
3131 not correctly enable encryption for the contents of the backup if
3132 the backup was stored in an S3 bucket that did not have encryption
3133 enabled. If this is the case for you, please consider deleting
3134 your old backups and taking new backups with Barman 2.13.
3135
3136 If your S3 buckets already have encryption enabled by default
3137 (which we recommend), this does not affect you.
3138
3139 ## 2.12.1 (2021-06-30)
3140
3141 ### Bugfixes
3142
3143 - Allow specifying target-tli with other `target-*` recovery options.
3144 - Fix incorrect NAME in barman-cloud-backup-list manpage.
3145 - Don't raise an error if SIGALRM is ignored.
3146 - Fetch wal_keep_size, not wal_keep_segments, from Postgres 13.
3147
3148 ## 2.12 (2020-11-05)
3149
3150 ### Notable changes
3151
3152 - Introduce a new backup_method option called local-rsync which
3153 targets those cases where Barman is installed on the same server
3154 where PostgreSQL is and directly uses rsync to take base backups,
3155 bypassing the SSH layer.
3156
3157 ### Bugfixes
3158
3159 - Avoid corrupting boto connection in worker processes.
3160 - Avoid connection attempts to PostgreSQL during tests.
3161
3162 ## 2.11 (2020-07-09)
3163
3164 ### Notable changes
3165
3166 - Introduction of the barman-cli-cloud package that contains all cloud
3167 related utilities.
3168
3169 - Add barman-cloud-wal-restore to restore a WAL file previously
3170 archived with barman-cloud-wal-archive from an object store.
3171
3172 - Add barman-cloud-restore to restore a backup previously taken with
3173 barman-cloud-backup from an object store.
3174
3175 - Add barman-cloud-backup-list to list backups taken with
3176 barman-cloud-backup in an object store.
3177
3178 - Add support for arbitrary archive size for barman-cloud-backup.
3179
3180 - Add support for --endpoint-url option to cloud utilities.
3181
3182 - Remove strict superuser requirement for PG 10+ (by Kaarel Moppel).
3183
3184 - Add --log-level runtime option for barman to override default log
3185 level for a specific command.
3186
3187 - Support for PostgreSQL 13
3188
3189 ### Bugfixes
3190
3191 - Suppress messages and warning with SSH connections in barman-cli
3192 (GH-257).
3193 - Fix a race condition when retrieving uploaded parts in
3194 barman-cloud-backup (GH-259).
3195 - Close the PostgreSQL connection after a backup (GH-258).
3196 - Check for uninitialized replication slots in receive-wal --reset
3197 (GH-260).
3198 - Ensure that begin_wal is valorised before acting on it (GH-262).
3199 - Fix bug in XLOG/WAL arithmetic with custom segment size (GH-287).
3200 - Fix rsync compatibility error with recent rsync.
3201 - Fix PostgreSQLClient version parsing.
3202 - Fix PostgreSQL exception handling with non ASCII messages.
3203 - Ensure each postgres connection has an empty search_path.
3204 - Avoid connecting to PostgreSQL while reading a backup.info file.
3205
3206 If you are using already `barman-cloud-wal-archive` or `barman-cloud-backup`
3207 installed via RPM/Apt package and you are upgrading your system, you
3208 must install the barman-cli-cloud package. All cloud related tools are
3209 now part of the barman-cli-cloud package, including
3210 `barman-cloud-wal-archive` and `barman-cloud-backup` that were previously
3211 shipped with `barman-cli`. The reason is complex dependency management of
3212 the boto3 library, which is a requirement for the cloud utilities.
3213
3214 ## 2.10 (2019-12-05)
3215
3216 ### Notable changes
3217
3218 - Pull .partial WAL files with get-wal and barman-wal-restore,
3219 allowing restore_command in a recovery scenario to fetch a partial
3220 WAL file's content from the Barman server. This feature simplifies
3221 and enhances RPO=0 recovery operations.
3222
3223 - Store the PostgreSQL system identifier in the server directory and
3224 inside the backup information file. Improve check command to verify
3225 the consistency of the system identifier with active connections
3226 (standard and replication) and data on disk.
3227
3228 - A new script called barman-cloud-wal-archive has been added to the
3229 barman-cli package to directly ship WAL files from PostgreSQL (using
3230 archive_command) to cloud object storage services that are
3231 compatible with AWS S3. It supports encryption and compression.
3232
3233 - A new script called barman-cloud-backup has been added to the
3234 barman-cli package to directly ship base backups from a local
3235 PostgreSQL server to cloud object storage services that are
3236 compatible with AWS S3. It supports encryption, parallel upload,
3237 compression.
3238
3239 - Automated creation of replication slots through the server/global
3240 option create_slot. When set to auto, Barman creates the replication
3241 slot, in case streaming_archiver is enabled and slot_name is
3242 defined. The default value is manual for back-compatibility.
3243
3244 - Add '-w/--wait' option to backup command, making Barman wait for all
3245 required WAL files to be archived before considering the backup
3246 completed. Add also the --wait-timeout option (default 0, no
3247 timeout).
3248
3249 - Redact passwords from Barman output, in particular from
3250 barman diagnose (InfoSec)
3251
3252 - Improve robustness of receive-wal --reset command, by verifying that
3253 the last partial file is aligned with the current location or, if
3254 present, with replication slot's.
3255
3256 - Documentation improvements
3257
3258 ### Bugfixes
3259
3260 - Wrong string matching operation when excluding tablespaces
3261 inside PGDATA (GH-245).
3262 - Minor fixes in WAL delete hook scripts (GH-240).
3263 - Fix PostgreSQL connection aliveness check (GH-239).
3264
3265 ## 2.9 (2019-08-01)
3266
3267 ### Notable changes
3268
3269 - Transparently support PostgreSQL 12, by supporting the new way of
3270 managing recovery and standby settings through GUC options and
3271 signal files (recovery.signal and standby.signal)
3272
3273 - Add --bwlimit command line option to set bandwidth limitation for
3274 backup and recover commands
3275
3276 - Ignore WAL archive failure for check command in case the latest
3277 backup is WAITING_FOR_WALS
3278
3279 - Add --target-lsn option to set recovery target Log Sequence Number
3280 for recover command with PostgreSQL 10 or higher
3281
3282 - Add --spool-dir option to barman-wal-restore so that users can
3283 change the spool directory location from the default, avoiding
3284 conflicts in case of multiple PostgreSQL instances on the same
3285 server (thanks to Drazen Kacar).
3286
3287 - Rename barman_xlog directory to barman_wal
3288
3289 - JSON output writer to export command output as JSON objects and
3290 facilitate integration with external tools and systems (thanks to
3291 Marcin Onufry Hlybin). Experimental in this release.
3292
3293 ### Bugfixes
3294
3295 - `replication-status` doesn’t show streamers with no slot (GH-222)
3296
3297 - When checking that a connection is alive (“SELECT 1” query),
3298 preserve the status of the PostgreSQL connection (GH-149). This
3299 fixes those cases of connections that were terminated due to
3300 idle-in-transaction timeout, causing concurrent backups to fail.
3301
3302 ## 2.8 (2019-05-17)
3303
3304 ### Notable changes
3305
3306 - Add support for reuse_backup in geo-redundancy for incremental
3307 backup copy in passive nodes
3308
3309 - Improve performance of rsync based copy by using strptime instead of
3310 the more generic dateutil.parser (#210)
3311
3312 - Add ‘--test’ option to barman-wal-archive and barman-wal-restore to
3313 verify the connection with the Barman server
3314
3315 - Complain if backup_options is not explicitly set, as the future
3316 default value will change from exclusive_backup to concurrent_backup
3317 when PostgreSQL 9.5 will be declared EOL by the PGDG
3318
3319 - Display additional settings in the show-server and diagnose
3320 commands: archive_timeout, data_checksums, hot_standby,
3321 max_wal_senders, max_replication_slots and wal_compression.
3322
3323 - Merge the barman-cli project in Barman
3324
3325 ### Minor changes
3326
3327 - Improve messaging of check --nagios for inactive servers.
3328 - Log remote SSH command with recover command.
3329 - Hide logical decoding connections in replication-status command.
3330
3331 This release officially supports Python 3 and deprecates Python 2 (which
3332 might be discontinued in future releases).
3333
3334 PostgreSQL 9.3 and older is deprecated from this release of Barman.
3335 Support for backup from standby is now limited to PostgreSQL 9.4 or
3336 higher and to WAL shipping from the standby (please refer to the
3337 documentation for details).
3338
3339 ### Bugfixes
3340
3341 - Fix encoding error in get-wal on Python 3 (Jeff Janes, #221).
3342 - Fix exclude_and_protect_filter (Jeff Janes, #217).
3343 - Remove spurious message when resetting WAL (Jeff Janes, #215).
3344 - Fix sync-wals error if primary has WALs older than the first
3345 backup.
3346 - Support for double quotes in synchronous_standby_names setting.
3347
3348 ## 2.7 (2019-03-12)
3349
3350 ### Notable changes
3351
3352 - Fix error handling during the parallel backup. Previously an
3353 unrecoverable error during the copy could have corrupted the barman
3354 internal state, requiring a manual kill of barman process with
3355 SIGTERM and a manual cleanup of the running backup in PostgreSQL.
3356 (GH#199).
3357
3358 - Fix support of UTF-8 characters in input and output (GH#194 and
3359 GH#196).
3360
3361 - Ignore history/backup/partial files for first sync of geo-redundancy
3362 (GH#198).
3363
3364 - Fix network failure with geo-redundancy causing cron to break
3365 (GH#202).
3366
3367 - Fix backup validation in PostgreSQL older than 9.2.
3368
3369 - Various documentation fixes.
3370
3371 ## 2.6 (2019-02-04)
3372
3373 ### Notable changes
3374
3375 - Add support for Geographical redundancy, introducing 3 new commands:
3376 sync-info, sync-backup and sync-wals. Geo-redundancy allows a Barman
3377 server to use another Barman server as data source instead of a
3378 PostgreSQL server.
3379
3380 - Add put-wal command that allows Barman to safely receive WAL files
3381 via PostgreSQL's archive_command using the barman-wal-archive script
3382 included in barman-cli.
3383
3384 - Add ANSI colour support to check command.
3385
3386 ### Bugfixes
3387
3388 - Fix switch-wal on standby with an empty WAL directory.
3389 - Honour archiver locking in wait_for_wal method.
3390 - Fix WAL compression detection algorithm.
3391 - Fix current_action in concurrent stop backup errors.
3392 - Do not treat lock file busy as an error when validating a backup.
3393
3394 ## 2.5 (2018-10-23)
3395
3396 ### Notable changes
3397
3398 - Add support for PostgreSQL 11
3399
3400 - Add check-backup command to verify that WAL files required for
3401 consistency of a base backup are present in the archive. Barman now
3402 adds a new state (WAITING_FOR_WALS) after completing a base backup,
3403 and sets it to DONE once it has verified that all WAL files from
3404 start to the end of the backup exist. This command is included in
3405 the regular cron maintenance job. Barman now notifies users
3406 attempting to recover a backup that is in WAITING_FOR_WALS state.
3407
3408 - Allow switch-xlog --archive to work on a standby (just for the
3409 archive part)
3410
3411 ### Bugfixes
3412
3413 - Fix decoding errors reading external commands output (issue
3414 #174).
3415
3416 - Fix documentation regarding WAL streaming and backup from
3417 standby.
3418
3419 ## 2.4 (2018-05-25)
3420
3421 ### Notable changes
3422
3423 - Add standard and retry hook scripts for backup deletion (pre/post).
3424 - Add standard and retry hook scripts for recovery (pre/post).
3425 - Add standard and retry hook scripts for WAL deletion (pre/post).
3426 - Add --standby-mode option to barman recover to add standby_mode = on
3427 in pre-generated recovery.conf.
3428 - Add --target-action option to barman recover, allowing users to add
3429 shutdown, pause or promote to the pre-generated recovery.conf file.
3430 - Improve usability of point-in-time recovery with consistency checks
3431 (e.g. recovery time is after end time of backup).
3432 - Minor documentation improvements.
3433 - Drop support for Python 3.3.
3434
3435 ### Bugfixes
3436
3437 - Fix remote get_file_content method (GitHub #151), preventing
3438 incremental recovery from happening.
3439 - Unicode issues with command (GitHub #143 and #150).
3440 - Add --wal-method=none when pg_basebackup >= 10 (GitHub #133).
3441 - Stop process manager module from overwriting lock files content
3442 - Relax the rules for rsync output parsing
3443 - Ignore vanished files in streaming directory
3444 - Case insensitive slot names (GitHub #170)
3445 - Make DataTransferFailure.from_command_error() more resilient
3446 (GitHub #86)
3447 - Rename command() to barman_command() (GitHub #118)
3448 - Initialise synchronous standby names list if not set (GitHub #111)
3449 - Correct placeholders ordering (GitHub #138)
3450 - Force datestyle to iso for replication connections
3451 - Returns error if delete command does not remove the backup
3452 - Fix exception when calling is_power_of_two(None)
3453 - Downgraded sync standby names messages to debug (GitHub #89)
3454
3455 ## 2.3 (2017-09-05)
3456
3457 ### Notable changes
3458
3459 - Add support to PostgreSQL 10
3460
3461 - Follow naming changes in PostgreSQL 10:
3462
3463 - The switch-xlog command has been renamed to switch-wal.
3464 - In commands output, the xlog word has been changed to WAL and
3465 location has been changed to LSN when appropriate.
3466
3467 - Add the --network-compression/--no-network-compression options to
3468 barman recover to enable or disable network compression at run-time
3469 - Add --target-immediate option to recover command, in order to exit
3470 recovery when a consistent state is reached (end of the backup,
3471 available from PostgreSQL 9.4)
3472 - Show cluster state (master or standby) with barman status command
3473 - Documentation improvements
3474
3475 ### Bugfixes
3476
3477 - Fix high memory usage with parallel_jobs > 1 (#116)
3478 - Better handling of errors using parallel copy (#114)
3479 - Make barman diagnose more robust with system exceptions
3480 - Let archive-wal ignore files with .tmp extension
3481
3482 ## 2.2 (2017-07-17)
3483
3484 ### Notable changes
3485
3486 - Implement parallel copy for backup/recovery through the
3487 parallel_jobs global/server option to be overridden by the --jobs or
3488 -j runtime option for the backup and recover command. Parallel
3489 backup is available only for the rsync copy method. By default, it
3490 is set to 1 (for behaviour compatibility with previous versions).
3491
3492 - Support custom WAL size for PostgreSQL 8.4 and newer. At backup
3493 time, Barman retrieves from PostgreSQL wal_segment_size and
3494 wal_block_size values and computes the necessary calculations.
3495
3496 - Improve check command to ensure that incoming directory is empty
3497 when archiver=off, and streaming directory is empty when
3498 streaming_archiver=off (#80).
3499
3500 - Add external_configuration to backup_options so that users can
3501 instruct Barman to ignore backup of configuration files when they
3502 are not inside PGDATA (default for Debian/Ubuntu installations). In
3503 this case, Barman does not display a warning anymore.
3504
3505 - Add --get-wal and --no-get-wal options to barman recover
3506
3507 - Add max_incoming_wals_queue global/server option for the check
3508 command so that a non blocking error is returned in case incoming
3509 WAL directories for both archiver and the streaming_archiver contain
3510 more files than the specified value.
3511
3512 - Documentation improvements
3513
3514 - File format changes:
3515
3516 - The format of backup.info file has changed. For this reason a
3517 backup taken with Barman 2.2 cannot be read by a previous
3518 version of Barman. But, backups taken by previous versions can
3519 be read by Barman 2.2.
3520
3521 ### Bugfixes
3522
3523 - Allow replication-status to work against a standby
3524 - Close any PostgreSQL connection before starting pg_basebackup
3525 (#104, #108)
3526 - Safely handle paths containing special characters
3527 - Archive .partial files after promotion of streaming source
3528 - Recursively create directories during recovery (SF#44)
3529 - Improve xlog.db locking (#99)
3530 - Remove tablespace_map file during recover (#95)
3531 - Reconnect to PostgreSQL if connection drops (SF#82)
3532
3533 ## 2.1 (2017-01-05)
3534
3535 ### Notable changes
3536
3537 - Add --archive and --archive-timeout options to switch-xlog command.
3538
3539 - Preliminary support for PostgreSQL 10 (#73).
3540
3541 - Minor additions:
3542
3543 - Add last archived WAL info to diagnose output.
3544 - Add start time and execution time to the output of delete
3545 command.
3546
3547 ### Bugfixes
3548
3549 - Return failure for get-wal command on inactive server
3550 - Make streaming_archiver_names and streaming_backup_name options
3551 global (#57)
3552 - Fix rsync failures due to files truncated during transfer (#64)
3553 - Correctly handle compressed history files (#66)
3554 - Avoid de-referencing symlinks in pg_tblspc when preparing
3555 recovery (#55)
3556 - Fix comparison of last archiving failure (#40, #58)
3557 - Avoid failing recovery if postgresql.conf is not writable (#68)
3558 - Fix output of replication-status command (#56)
3559 - Exclude files from backups like pg_basebackup (#65, #72)
3560 - Exclude directories from other Postgres versions while copying
3561 tablespaces (#74)
3562 - Make retry hook script options global
3563
3564 ## 2.0 (2016-09-27)
3565
3566 ### Notable changes
3567
3568 - Support for pg_basebackup and base backups over the PostgreSQL
3569 streaming replication protocol with backup_method=postgres
3570 (PostgreSQL 9.1 or higher required)
3571
3572 - Support for physical replication slots through the slot_name
3573 configuration option as well as the --create-slot and --drop-slot
3574 options for the receive-wal command (PostgreSQL 9.4 or higher
3575 required). When slot_name is specified and streaming_archiver is
3576 enabled, receive-wal transparently integrates with pg_receivexlog,
3577 and check makes sure that slots exist and are actively used
3578
3579 - Support for the new backup API introduced in PostgreSQL 9.6, which
3580 transparently enables concurrent backups and backups from standby
3581 servers using the standard rsync method of backup. Concurrent backup
3582 was only possible for PostgreSQL 9.2 to 9.5 versions through the
3583 pgespresso extension. The new backup API will make pgespresso
3584 redundant in the future
3585
3586 - If properly configured, Barman can function as a synchronous standby
3587 in terms of WAL streaming. By properly setting the
3588 streaming_archiver_name in the synchronous_standby_names priority
3589 list on the master, and enabling replication slot support, the
3590 receive-wal command can now be part of a PostgreSQL synchronous
3591 replication cluster, bringing RPO=0 (PostgreSQL 9.5.5 or
3592 higher required)
3593
3594 - Introduce barman-wal-restore, a standard and robust script written
3595 in Python that can be used as restore_command in recovery.conf files
3596 of any standby server of a cluster. It supports remote parallel
3597 fetching of WAL files by efficiently invoking get-wal through SSH.
3598 Currently available as a separate project called barman-cli. The
3599 barman-cli package is required for remote recovery when get-wal is
3600 listed in recovery_options
3601
3602 - Control the maximum execution time of the check command through the
3603 check_timeout global/server configuration option (30 seconds
3604 by default)
3605
3606 - Limit the number of WAL segments that are processed by an
3607 archive-wal run, through the archiver_batch_size and
3608 streaming_archiver_batch_size global/server options which control
3609 archiving of WAL segments coming from, respectively, the standard
3610 archiver and receive-wal
3611
3612 - Removed locking of the XLOG database during check operations
3613
3614 - The show-backup command is now aware of timelines and properly
3615 displays which timelines can be used as recovery targets for a given
3616 base backup. Internally, Barman is now capable of parsing .history
3617 files
3618
3619 - Improved the logic behind the retry mechanism when copy operations
3620 experience problems. This involves backup (rsync and postgres) as
3621 well as remote recovery (rsync)
3622
3623 - Code refactoring involving remote command and physical copy
3624 interfaces
3625
3626 ### Bugfixes
3627
3628 - Correctly handle .history files from streaming
3629 - Fix replication-status on PostgreSQL 9.1
3630 - Fix replication-status when sent and write locations are not
3631 available
3632 - Fix misleading message on pg_receivexlog termination
3633
3634 ## 1.6.1 (2016-05-23)
3635
3636 ### Minor changes
3637
3638 - Add --peek option to get-wal command to discover existing WAL files
3639 from the Barman's archive
3640
3641 - Add replication-status command for monitoring the status of any
3642 streaming replication clients connected to the PostgreSQL server.
3643 The --target option allows users to limit the request to only hot
3644 standby servers or WAL streaming clients
3645
3646 - Add the switch-xlog command to request a switch of a WAL file to the
3647 PostgreSQL server. Through the '--force' it issues a CHECKPOINT
3648 beforehand
3649
3650 - Add streaming_archiver_name option, which sets a proper
3651 application_name to pg_receivexlog when streaming_archiver is
3652 enabled (only for PostgreSQL 9.3 and above)
3653
3654 - Check for _superuser_ privileges with PostgreSQL's standard
3655 connections (#30)
3656
3657 - Check the WAL archive is never empty
3658
3659 - Check for 'backup_label' on the master when server is down
3660
3661 - Improve barman-wal-restore contrib script
3662
3663 ### Bugfixes
3664
3665 - Treat the "failed backups" check as non-fatal
3666 - Rename '-x' option for get-wal as '-z'
3667 - Add archive_mode=always support for PostgreSQL 9.5 (#32)
3668 - Properly close PostgreSQL connections when necessary
3669 - Fix receive-wal for pg_receive_xlog version 9.2
3670
3671 ## 1.6.0 (2016-02-29)
3672
3673 ### Notable changes
3674
3675 - Support for streaming replication connection through the
3676 streaming_conninfo server option
3677
3678 - Support for the streaming_archiver option that allows Barman to
3679 receive WAL files through PostgreSQL's native streaming protocol.
3680 When set to 'on', it relies on pg_receivexlog to receive WAL data,
3681 reducing Recovery Point Objective. Currently, WAL streaming is an
3682 additional feature (standard log archiving is still required)
3683
3684 - Implement the receive-wal command that, when streaming_archiver is
3685 on, wraps pg_receivexlog for WAL streaming. Add --stop option to
3686 stop receiving WAL files via streaming protocol. Add --reset option
3687 to reset the streaming status and restart from the current xlog
3688 in Postgres.
3689
3690 - Automatic management (startup and stop) of receive-wal command via
3691 cron command
3692
3693 - Support for the path_prefix configuration option
3694
3695 - Introduction of the archiver option (currently fixed to on) which
3696 enables continuous WAL archiving for a specific server, through log
3697 shipping via PostgreSQL's archive_command
3698
3699 - Support for streaming_wals_directory and errors_directory options
3700
3701 - Management of WAL duplicates in archive-wal command and integration
3702 with check command
3703
3704 - Verify if pg_receivexlog is running in check command when
3705 streaming_archiver is enabled
3706
3707 - Verify if failed backups are present in check command
3708
3709 - Accept compressed WAL files in incoming directory
3710
3711 - Add support for the pigz compressor (thanks to Stefano Zacchiroli
3712 <[email protected]>)
3713
3714 - Implement pygzip and pybzip2 compressors (based on an initial idea
3715 of Christoph Moench-Tegeder <[email protected]>)
3716
3717 - Creation of an implicit restore point at the end of a backup
3718
3719 - Current size of the PostgreSQL data files in barman status
3720
3721 - Permit archive_mode=always for PostgreSQL 9.5 servers (thanks to
3722 Christoph Moench-Tegeder <[email protected]>)
3723
3724 - Complete refactoring of the code responsible for connecting to
3725 PostgreSQL
3726
3727 - Improve messaging of cron command regarding sub-processes
3728
3729 - Native support for Python >= 3.3
3730
3731 - Changes of behaviour:
3732 - Stop trashing WAL files during archive-wal (commit:e3a1d16)
3733
3734 ### Bugfixes
3735
3736 - Atomic WAL file archiving (#9 and #12)
3737 - Propagate "-c" option to any Barman subprocess (#19)
3738 - Fix management of backup ID during backup deletion (#22)
3739 - Improve archive-wal robustness and log messages (#24)
3740 - Improve error handling in case of missing parameters
3741
3742 ## 1.5.1 (2015-11-16)
3743
3744 ### Minor changes
3745
3746 - Add support for the 'archive-wal' command which performs WAL
3747 maintenance operations on a given server
3748 - Add support for "per-server" concurrency of the 'cron' command
3749 - Improved management of xlog.db errors
3750 - Add support for mixed compression types in WAL files (SF.net#61)
3751
3752 ### Bugfixes
3753
3754 - Avoid retention policy checks during the recovery
3755 - Avoid 'wal_level' check on PostgreSQL version < 9.0 (#3)
3756 - Fix backup size calculation (#5)
3757
3758 ## 1.5.0 (2015-09-28)
3759
3760 ### Notable changes
3761
3762 - Add support for the get-wal command which allows users to fetch any
3763 WAL file from the archive of a specific server
3764 - Add support for retry hook scripts, a special kind of hook scripts
3765 that Barman tries to run until they succeed
3766 - Add active configuration option for a server to temporarily disable
3767 the server by setting it to False
3768 - Add barman_lock_directory global option to change the location of
3769 lock files (by default: 'barman_home')
3770 - Execute the full suite of checks before starting a backup, and skip
3771 it in case one or more checks fail
3772 - Forbid to delete a running backup
3773 - Analyse include directives of a PostgreSQL server during backup and
3774 recover operations
3775 - Add check for conflicting paths in the configuration of Barman, both
3776 intra (by temporarily disabling a server) and inter-server (by
3777 refusing any command, to any server).
3778 - Add check for wal_level
3779 - Add barman-wal-restore script to be used as restore_command on a
3780 standby server, in conjunction with barman get-wal
3781 - Implement a standard and consistent policy for error management
3782 - Improved cache management of backups
3783 - Improved management of configuration in unit tests
3784 - Tutorial and man page sources have been converted to Markdown format
3785 - Add code documentation through Sphinx
3786 - Complete refactor of the code responsible for managing the backup
3787 and the recover commands
3788 - Changed internal directory structure of a backup
3789 - Introduce copy_method option (currently fixed to rsync)
3790
3791 ### Bugfixes
3792
3793 - Manage options without '=' in PostgreSQL configuration files
3794 - Preserve Timeline history files (Fixes: #70)
3795 - Workaround for rsync on SUSE Linux (Closes: #13 and #26)
3796 - Disables dangerous settings in postgresql.auto.conf
3797 (Closes: #68)
3798
3799 ## 1.4.1 (2015-05-05)
3800
3801 ### Minor changes
3802
3803 - Improved management of xlogdb file, which is now correctly fsynced
3804 when updated. Also, the rebuild-xlogdb command now operates on a
3805 temporary new file, which overwrites the main one when finished.
3806 - Add unit tests for dateutil module compatibility
3807 - Modified Barman version following PEP 440 rules and added support
3808 of tests in Python 3.4
3809
3810 ### Bugfixes
3811
3812 - Fix for WAL archival stop working if first backup is EMPTY
3813 (Closes: #64)
3814 - Fix exception during error handling in Barman recovery
3815 (Closes: #65)
3816 - After a backup, limit cron activity to WAL archiving only
3817 (Closes: #62)
3818 - Improved robustness and error reporting of the backup delete
3819 command (Closes: #63)
3820 - Fix computation of WAL production ratio as reported in the
3821 show-backup command
3822
3823 ## 1.4.0 (2015-01-26)
3824
3825 ### Notable changes
3826
3827 - Incremental base backup implementation through the reuse_backup
3828 global/server option. Possible values are off (disabled,
3829 default), copy (preventing unmodified files from being
3830 transferred) and link (allowing for deduplication through hard
3831 links).
3832 - Store and show deduplication effects when using reuse_backup=
3833 link.
3834 - Added transparent support of pg_stat_archiver (PostgreSQL 9.4) in
3835 check, show-server and status commands.
3836 - Improved administration by invoking WAL maintenance at the end of
3837 a successful backup.
3838 - Changed the way unused WAL files are trashed, by differentiating
3839 between concurrent and exclusive backup cases.
3840 - Improved performance of WAL statistics calculation.
3841 - Treat a missing pg_ident.conf as a WARNING rather than an error.
3842 - Refactored output layer by removing remaining yield calls.
3843 - Check that rsync is in the system path.
3844 - Include history files in WAL management.
3845 - Improved robustness through more unit tests.
3846
3847 ### Bugfixes
3848
3849 - Fixed bug #55: Ignore fsync EINVAL errors on directories.
3850 - Fixed bug #58: retention policies delete.
3851
3852 ## 1.3.3 (2014-08-21)
3853
3854 ### Notable changes
3855
3856 - Added "last_backup_max_age", a new global/server option that
3857 allows administrators to set the max age of the last backup in a
3858 catalogue, making it easier to detect any issues with periodical
3859 backup execution
3860 - Improved robustness of "barman backup" by introducing two global/
3861 server options: "basebackup_retry_times" and
3862 "basebackup_retry_sleep". These options allow an administrator to
3863 specify, respectively, the number of attempts for a copy
3864 operation after a failure, and the number of seconds of wait
3865 before retrying
3866 - Improved the recovery process via rsync on an existing directory
3867 (incremental recovery), by splitting the previous rsync call into
3868 several ones - invoking checksum control only when necessary
3869 - Added support for PostgreSQL 8.3
3870
3871 ### Minor changes
3872
3873 - Support for comma separated list values configuration options
3874 - Improved backup durability by calling fsync() on backup and
3875 WAL files during "barman backup" and "barman cron"
3876 - Improved Nagios output for "barman check --nagios"
3877 - Display compression ratio for WALs in "barman show-backup"
3878 - Correctly handled keyboard interruption (CTRL-C) while
3879 performing barman backup
3880 - Improved error messages of failures regarding the stop of a
3881 backup
3882 - Wider coverage of unit tests
3883
3884 ### Bugfixes
3885
3886 - Copies "recovery.conf" on the remote server during "barman
3887 recover" (#45)
3888 - Correctly detect pre/post archive hook scripts (#41)
3889
3890 ## 1.3.2 (2014-04-15)
3891
3892 ### Bugfixes
3893
3894 - Fixed incompatibility with PostgreSQL 8.4 (Closes #40, bug
3895 introduced in version 1.3.1)
3896
3897 ## 1.3.1 (2014-04-14)
3898
3899 ### Minor changes
3900
3901 - Added support for concurrent backup of PostgreSQL 9.2 and 9.3
3902 servers that use the "pgespresso" extension. This feature is
3903 controlled by the "backup_options" configuration option (global/
3904 server) and activated when set to "concurrent_backup". Concurrent
3905 backup allows DBAs to perform full backup operations from a
3906 streaming replicated standby.
3907 - Added the "barman diagnose" command which prints important
3908 information about the Barman system (extremely useful for support
3909 and problem solving)
3910 - Improved error messages and exception handling interface
3911
3912 ### Bugfixes
3913
3914 - Fixed bug in recovery of tablespaces that are created inside the
3915 PGDATA directory (bug introduced in version 1.3.0)
3916 - Fixed minor bug of unhandled -q option, for quiet mode of
3917 commands to be used in cron jobs (bug introduced in version
3918 1.3.0)
3919 - Minor bug fixes and code refactoring
3920
3921 ## 1.3.0 (2014-02-03)
3922
3923 ### Notable changes
3924
3925 - Refactored BackupInfo class for backup metadata to use the new
3926 FieldListFile class (infofile module)
3927
3928 - Refactored output layer to use a dedicated module, in order to
3929 facilitate integration with Nagios (NagiosOutputWriter class)
3930
3931 - Refactored subprocess handling in order to isolate stdin/stderr/
3932 stdout channels (command_wrappers module)
3933
3934 - Refactored hook scripts management
3935
3936 - Extracted logging configuration and userid enforcement from the
3937 configuration class.
3938
3939 - Support for hook scripts to be executed before and after a WAL
3940 file is archived, through the 'pre_archive_script' and
3941 'post_archive_script' configuration options.
3942
3943 - Implemented immediate checkpoint capability with
3944 --immediate-checkpoint command option and 'immediate_checkpoint'
3945 configuration option
3946
3947 - Implemented network compression for remote backup and recovery
3948 through the 'network_compression' configuration option (#19)
3949
3950 - Implemented the 'rebuild-xlogdb' command (Closes #27 and #28)
3951
3952 - Added deduplication of tablespaces located inside the PGDATA
3953 directory
3954
3955 - Refactored remote recovery code to work the same way local
3956 recovery does, by performing remote directory preparation
3957 (assuming the remote user has the right permissions on the remote
3958 server)
3959
3960 - 'barman backup' now tries and create server directories before
3961 attempting to execute a full backup (#14)
3962
3963 ### Bugfixes
3964
3965 - Fixed bug #22: improved documentation for tablespaces relocation
3966
3967 - Fixed bug #31: 'barman cron' checks directory permissions for
3968 lock file
3969
3970 - Fixed bug #32: xlog.db read access during cron activities
3971
3972 ## 1.2.3 (2013-09-05)
3973
3974 ### Minor changes
3975
3976 - Added support for PostgreSQL 9.3
3977
3978 - Added support for the "--target-name" recovery option, which allows to
3979 restore to a named point previously specified with pg_create_restore_point
3980 (only for PostgreSQL 9.1 and above users)
3981
3982 - Introduced Python 3 compatibility
3983
3984 ### Bugfixes
3985
3986 - Fixed bug #27 about flock() usage with barman.lockfile (many thanks to
3987 Damon Snyder <[email protected]>)
3988
3989 ## 1.2.2 (2013-06-24)
3990
3991 ### Bugfixes
3992
3993 - Fix python 2.6 compatibility
3994
3995 ## 1.2.1 (2013-06-17)
3996
3997 ### Minor changes
3998
3999 - Added the "bandwidth_limit" global/server option which allows
4000 to limit the I/O bandwidth (in KBPS) for backup and recovery operations
4001
4002 - Added the "tablespace_bandwidth_limit" global/server option which allows
4003 to limit the I/O bandwidth (in KBPS) for backup and recovery operations
4004 on a per tablespace basis
4005
4006 - Added /etc/barman/barman.conf as default location
4007
4008 ### Bugfixes
4009
4010 - Avoid triggering the minimum_redundancy check
4011 on FAILED backups (thanks to Jérôme Vanandruel)
4012
4013 ## 1.2.0 (2013-01-31)
4014
4015 ### Notable changes
4016
4017 - Added the "retention_policy_mode" global/server option which defines
4018 the method for enforcing retention policies (currently only "auto")
4019
4020 - Added the "minimum_redundancy" global/server option which defines
4021 the minimum number of backups to be kept for a server
4022
4023 - Added the "retention_policy" global/server option which defines
4024 retention policies management based on redundancy (e.g. REDUNDANCY 4)
4025 or recovery window (e.g. RECOVERY WINDOW OF 3 MONTHS)
4026
4027 - Added retention policy support to the logging infrastructure, the
4028 "check" and the "status" commands
4029
4030 - The "check" command now integrates minimum redundancy control
4031
4032 - Added retention policy states (valid, obsolete and potentially obsolete)
4033 to "show-backup" and "list-backup" commands
4034
4035 - The 'all' keyword is now forbidden as server name
4036
4037 - Added basic support for Nagios plugin output to the 'check'
4038 command through the --nagios option
4039
4040 - Barman now requires argh => 0.21.2 and argcomplete-
4041
4042 - Minor bug fixes
4043
4044 ## 1.1.2 (2012-11-29)
4045
4046 ### Minor changes
4047
4048 - Added "configuration_files_directory" option that allows
4049 to include multiple server configuration files from a directory
4050
4051 - Support for special backup IDs: latest, last, oldest, first
4052
4053 - Management of multiple servers to the 'list-backup' command.
4054 'barman list-backup all' now list backups for all the configured servers.
4055
4056 - Added "application_name" management for PostgreSQL >= 9.0
4057
4058 ### Bugfixes
4059
4060 - Fixed bug #18: ignore missing WAL files if not found during delete
4061
4062 ## 1.1.1 (2012-10-16)
4063
4064 ### Bugfixes
4065
4066 - Fix regressions in recover command.
4067
4068 ## 1.1.0 (2012-10-12)
4069
4070 ### Notable changes
4071
4072 - Support for hook scripts to be executed before and after
4073 a 'backup' command through the 'pre_backup_script' and 'post_backup_script'
4074 configuration options.
4075
4076 - Management of multiple servers to the 'backup' command.
4077 'barman backup all' now iteratively backs up all the configured servers.
4078
4079 - Add warning in recovery when file location options have been defined
4080 in the postgresql.conf file (issue #10)
4081
4082 - Fail fast on recover command if the destination directory contains
4083 the ':' character (Closes: #4) or if an invalid tablespace
4084 relocation rule is passed
4085
4086 - Report an informative message when pg_start_backup() invocation
4087 fails because an exclusive backup is already running (Closes: #8)
4088
4089 ### Bugfixes
4090
4091 - Fixed bug #9: "9.2 issue with pg_tablespace_location()"
4092
4093 ## 1.0.0 (2012-07-06)
4094
4095 ### Notable changes
4096
4097 - Backup of multiple PostgreSQL servers, with different versions. Versions
4098 from PostgreSQL 8.4+ are supported.
4099
4100 - Support for secure remote backup (through SSH)
4101
4102 - Management of a catalog of backups for every server, allowing users
4103 to easily create new backups, delete old ones or restore them
4104
4105 - Compression of WAL files that can be configured on a per server
4106 basis using compression/decompression filters, both predefined (gzip
4107 and bzip2) or custom
4108
4109 - Support for INI configuration file with global and per-server directives.
4110 Default location for configuration files are /etc/barman.conf or
4111 ~/.barman.conf. The '-c' option allows users to specify a different one
4112
4113 - Simple indexing of base backups and WAL segments that does not require
4114 a local database
4115
4116 - Maintenance mode (invoked through the 'cron' command) which performs
4117 ordinary operations such as WAL archival and compression, catalog
4118 updates, etc.
4119
4120 - Added the 'backup' command which takes a full physical base backup
4121 of the given PostgreSQL server configured in Barman
4122
4123 - Added the 'recover' command which performs local recovery of a given
4124 backup, allowing DBAs to specify a point in time. The 'recover' command
4125 supports relocation of both the PGDATA directory and, where applicable,
4126 the tablespaces
4127
4128 - Added the '--remote-ssh-command' option to the 'recover' command for
4129 remote recovery of a backup. Remote recovery does not currently support
4130 relocation of tablespaces
4131
4132 - Added the 'list-server' command that lists all the active servers
4133 that have been configured in barman
4134
4135 - Added the 'show-server' command that shows the relevant information
4136 for a given server, including all configuration options
4137
4138 - Added the 'status' command which shows information about the current
4139 state of a server, including Postgres version, current transaction ID,
4140 archive command, etc.
4141
4142 - Added the 'check' command which returns 0 if everything Barman needs
4143 is functioning correctly
4144
4145 - Added the 'list-backup' command that lists all the available backups
4146 for a given server, including size of the base backup and total size
4147 of the related WAL segments
4148
4149 - Added the 'show-backup' command that shows the relevant information
4150 for a given backup, including time of start, size, number of related
4151 WAL segments and their size, etc.
4152
4153 - Added the 'delete' command which removes a backup from the catalog
4154
4155 - Added the 'list-files' command which lists all the files for a
4156 single backup
4157
4158 - RPM Package for RHEL 5/6