diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3eaf1662a..2406eb279 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,23 +8,6 @@ on: branches: [master] jobs: - linter: - name: flake8 - runs-on: ubuntu-latest - steps: - - name: Step 1 - Checkout repository - uses: actions/checkout@v4 - - name: Step 2 - Install python - uses: actions/setup-python@v5 - with: - python-version: 3.7 - - name: Step 3 - Install dependencies - run: | - python -m pip install --upgrade pip setuptools wheel - python -m pip install -r requirements-tox.txt - - name: Step 4 - Run flake with tox - run: "python -m tox -e flake8" - unit-tests: name: "Python ${{ matrix.python-version }} ${{ matrix.tox-env }}" runs-on: ubuntu-20.04 diff --git a/RELNOTES.md b/RELNOTES.md index dc431e0c7..2f3c71e29 100644 --- a/RELNOTES.md +++ b/RELNOTES.md @@ -2,6 +2,25 @@ © Copyright EnterpriseDB UK Limited 2024 - All rights reserved. +## 3.12.1 (2024-12-09) + +### Bugfixes + +- Add isoformat fields for backup start and end times in json output + + This patch modifies the json output of the infofile object + adding two new fields: `begin_time_iso` and `end_time_iso`. + The new fields allow the use of a more standard and timezone aware + time format, preserving compatibility with previous versions. + It is worth noting that in the future the iso format for dates will be the + standard used by barman for storing dates and will be used everywhere + non human readable output is requested. + + As part of the work, this patch reverts BAR-316, which was introduced on Barman + 3.12.0. + + References: BAR-494. + ## 3.12.0 (2024-11-21) ### Minor changes @@ -157,6 +176,14 @@ References: BAR-417. +- Use ISO format instead of ctime when producing JSON output of Barman cloud commands + + The ctime format has no information about the time zone associated with the timestamp. + Besides that, that format is better suited for human consumption. For machine + consumption the ISO format is better suited. + + References: BAR-316. + ### Bugfixes - Fix barman check which returns wrong results for Replication Slot @@ -213,6 +240,16 @@ References: BAR-348. +- Check for USAGE instead of MEMBER when calling pg_has_role in Barman + + To work correctly Barman database user needs to be included in some roles. Barman was + verifying the conditions was satisfied by calling `pg_has_role` in Postgres. However, + it was check for the `MEMBER` privilege instead of `USAGE`. This oversight was fixed. + + This change is a contribution from @RealGreenDragon. + + References: BAR-489. + ## 3.11.1 (2024-08-22) ### Bugfixes diff --git a/barman/infofile.py b/barman/infofile.py index f4df25d9a..b322e82d1 100644 --- a/barman/infofile.py +++ b/barman/infofile.py @@ -713,10 +713,19 @@ def to_json(self): # Convert fields which need special types not supported by json if data.get("tablespaces") is not None: data["tablespaces"] = [list(item) for item in data["tablespaces"]] + # Note on the `begin_time_iso`` and `end_time_iso`` fields: + # as ctime is not timezone-aware and mostly for human-readable output, + # we want to migrate to isoformat for datetime objects representation. + # To retain, for now, compatibility with the previous version of the output + # we add two new _iso fields to the json document. if data.get("begin_time") is not None: - data["begin_time"] = data["begin_time"].isoformat() + begin_time = data["begin_time"] + data["begin_time"] = begin_time.ctime() + data["begin_time_iso"] = begin_time.isoformat() if data.get("end_time") is not None: - data["end_time"] = data["end_time"].isoformat() + end_time = data["end_time"] + data["end_time"] = end_time.ctime() + data["end_time_iso"] = end_time.isoformat() return data @classmethod @@ -734,9 +743,15 @@ def from_json(cls, server, json_backup_info): data["tablespaces"] = [ Tablespace._make(item) for item in data["tablespaces"] ] - if data.get("begin_time") is not None: + if data.get("begin_time_iso") is not None: + data["begin_time"] = load_datetime_tz(data["begin_time_iso"]) + del data["begin_time_iso"] + elif data.get("begin_time") is not None: data["begin_time"] = load_datetime_tz(data["begin_time"]) - if data.get("end_time") is not None: + if data.get("end_time_iso") is not None: + data["end_time"] = load_datetime_tz(data["end_time_iso"]) + del data["end_time_iso"] + elif data.get("end_time") is not None: data["end_time"] = load_datetime_tz(data["end_time"]) # Instantiate a BackupInfo object using the converted fields return cls(server, **data) diff --git a/barman/version.py b/barman/version.py index 9ae4d82f5..0284fb240 100644 --- a/barman/version.py +++ b/barman/version.py @@ -20,4 +20,4 @@ This module contains the current Barman version. """ -__version__ = "3.12.0" +__version__ = "3.12.1" diff --git a/docs/_build/man/barman-archive-wal.1 b/docs/_build/man/barman-archive-wal.1 index e71d32863..9d82b7d0a 100644 --- a/docs/_build/man/barman-archive-wal.1 +++ b/docs/_build/man/barman-archive-wal.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BARMAN-ARCHIVE-WAL" "1" "Nov 21, 2024" "3.12" "Barman" +.TH "BARMAN-ARCHIVE-WAL" "1" "Dec 09, 2024" "3.12" "Barman" .SH NAME barman-archive-wal \- Barman Sub-Commands .SH SYNOPSIS diff --git a/docs/_build/man/barman-backup.1 b/docs/_build/man/barman-backup.1 index 2bfd084f2..ff98cdade 100644 --- a/docs/_build/man/barman-backup.1 +++ b/docs/_build/man/barman-backup.1 @@ -28,7 +28,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BARMAN-BACKUP" "1" "Nov 21, 2024" "3.12" "Barman" +.TH "BARMAN-BACKUP" "1" "Dec 09, 2024" "3.12" "Barman" .SH NAME barman-backup \- Barman Sub-Commands .SH SYNOPSIS diff --git a/docs/_build/man/barman-check-backup.1 b/docs/_build/man/barman-check-backup.1 index 7eb82aff6..fe6b9de77 100644 --- a/docs/_build/man/barman-check-backup.1 +++ b/docs/_build/man/barman-check-backup.1 @@ -28,7 +28,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BARMAN-CHECK-BACKUP" "1" "Nov 21, 2024" "3.12" "Barman" +.TH "BARMAN-CHECK-BACKUP" "1" "Dec 09, 2024" "3.12" "Barman" .SH NAME barman-check-backup \- Barman Sub-Commands .SH SYNOPSIS diff --git a/docs/_build/man/barman-check.1 b/docs/_build/man/barman-check.1 index c34ce0544..819c9b38d 100644 --- a/docs/_build/man/barman-check.1 +++ b/docs/_build/man/barman-check.1 @@ -28,7 +28,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BARMAN-CHECK" "1" "Nov 21, 2024" "3.12" "Barman" +.TH "BARMAN-CHECK" "1" "Dec 09, 2024" "3.12" "Barman" .SH NAME barman-check \- Barman Sub-Commands .SH SYNOPSIS diff --git a/docs/_build/man/barman-cloud-backup-delete.1 b/docs/_build/man/barman-cloud-backup-delete.1 index 188e4e5d3..84a756337 100644 --- a/docs/_build/man/barman-cloud-backup-delete.1 +++ b/docs/_build/man/barman-cloud-backup-delete.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BARMAN-CLOUD-BACKUP-DELETE" "1" "Nov 21, 2024" "3.12" "Barman" +.TH "BARMAN-CLOUD-BACKUP-DELETE" "1" "Dec 09, 2024" "3.12" "Barman" .SH NAME barman-cloud-backup-delete \- Barman-cloud Commands .sp diff --git a/docs/_build/man/barman-cloud-backup-keep.1 b/docs/_build/man/barman-cloud-backup-keep.1 index 5690f3fa4..e5453680b 100644 --- a/docs/_build/man/barman-cloud-backup-keep.1 +++ b/docs/_build/man/barman-cloud-backup-keep.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BARMAN-CLOUD-BACKUP-KEEP" "1" "Nov 21, 2024" "3.12" "Barman" +.TH "BARMAN-CLOUD-BACKUP-KEEP" "1" "Dec 09, 2024" "3.12" "Barman" .SH NAME barman-cloud-backup-keep \- Barman-cloud Commands .sp diff --git a/docs/_build/man/barman-cloud-backup-list.1 b/docs/_build/man/barman-cloud-backup-list.1 index ee5095dc5..252d8ee20 100644 --- a/docs/_build/man/barman-cloud-backup-list.1 +++ b/docs/_build/man/barman-cloud-backup-list.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BARMAN-CLOUD-BACKUP-LIST" "1" "Nov 21, 2024" "3.12" "Barman" +.TH "BARMAN-CLOUD-BACKUP-LIST" "1" "Dec 09, 2024" "3.12" "Barman" .SH NAME barman-cloud-backup-list \- Barman-cloud Commands .sp diff --git a/docs/_build/man/barman-cloud-backup-show.1 b/docs/_build/man/barman-cloud-backup-show.1 index 2b0fab017..861b86603 100644 --- a/docs/_build/man/barman-cloud-backup-show.1 +++ b/docs/_build/man/barman-cloud-backup-show.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BARMAN-CLOUD-BACKUP-SHOW" "1" "Nov 21, 2024" "3.12" "Barman" +.TH "BARMAN-CLOUD-BACKUP-SHOW" "1" "Dec 09, 2024" "3.12" "Barman" .SH NAME barman-cloud-backup-show \- Barman-cloud Commands .sp diff --git a/docs/_build/man/barman-cloud-backup.1 b/docs/_build/man/barman-cloud-backup.1 index 3848a2eab..6b0391a95 100644 --- a/docs/_build/man/barman-cloud-backup.1 +++ b/docs/_build/man/barman-cloud-backup.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BARMAN-CLOUD-BACKUP" "1" "Nov 21, 2024" "3.12" "Barman" +.TH "BARMAN-CLOUD-BACKUP" "1" "Dec 09, 2024" "3.12" "Barman" .SH NAME barman-cloud-backup \- Barman-cloud Commands .sp @@ -199,7 +199,7 @@ Instance where the disks to be backed up as snapshots are attached. Name of a disk from which snapshots should be taken. .TP .B \fB\-\-tags\fP -Tags to be added to archived WAL files in cloud storage and to snapshots created, if +Tags to be added to all uploaded files in cloud storage, and/or to snapshots created, if snapshots are used. .UNINDENT .sp diff --git a/docs/_build/man/barman-cloud-check-wal-archive.1 b/docs/_build/man/barman-cloud-check-wal-archive.1 index 139bff105..6f372aec4 100644 --- a/docs/_build/man/barman-cloud-check-wal-archive.1 +++ b/docs/_build/man/barman-cloud-check-wal-archive.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BARMAN-CLOUD-CHECK-WAL-ARCHIVE" "1" "Nov 21, 2024" "3.12" "Barman" +.TH "BARMAN-CLOUD-CHECK-WAL-ARCHIVE" "1" "Dec 09, 2024" "3.12" "Barman" .SH NAME barman-cloud-check-wal-archive \- Barman-cloud Commands .sp diff --git a/docs/_build/man/barman-cloud-restore.1 b/docs/_build/man/barman-cloud-restore.1 index 1ff14e144..76f1ccd85 100644 --- a/docs/_build/man/barman-cloud-restore.1 +++ b/docs/_build/man/barman-cloud-restore.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BARMAN-CLOUD-RESTORE" "1" "Nov 21, 2024" "3.12" "Barman" +.TH "BARMAN-CLOUD-RESTORE" "1" "Dec 09, 2024" "3.12" "Barman" .SH NAME barman-cloud-restore \- Barman-cloud Commands .sp diff --git a/docs/_build/man/barman-cloud-wal-archive.1 b/docs/_build/man/barman-cloud-wal-archive.1 index fadfd5d98..0a763f36a 100644 --- a/docs/_build/man/barman-cloud-wal-archive.1 +++ b/docs/_build/man/barman-cloud-wal-archive.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BARMAN-CLOUD-WAL-ARCHIVE" "1" "Nov 21, 2024" "3.12" "Barman" +.TH "BARMAN-CLOUD-WAL-ARCHIVE" "1" "Dec 09, 2024" "3.12" "Barman" .SH NAME barman-cloud-wal-archive \- Barman-cloud Commands .sp @@ -43,9 +43,7 @@ barman\-cloud\-wal\-archive [ { \-q | \-\-quiet } ] [ { \-t | \-\-test } ] [ \-\-cloud\-provider { aws\-s3 | azure\-blob\-storage | google\-cloud\-storage } ] - [ { \-z | \-\-gzip } ] - [ { \-j | \-\-bzip2 } ] - [ \-\-snappy ] + [ { { \-z | \-\-gzip } | { \-j | \-\-bzip2 } | \-\-xz | \-\-snappy | \-\-zstd | \-\-lz4 } ] [ \-\-tags [ TAGS ... ] ] [ \-\-history\-tags [ HISTORY_TAGS ... ] ] [ \-\-endpoint\-url ENDPOINT_URL ] @@ -137,10 +135,21 @@ gzip\-compress the WAL while uploading to the cloud (should not be used with pyt bzip2\-compress the WAL while uploading to the cloud (should not be used with python < 3.3). .TP +.B \fB\-\-xz\fP +xz\-compress the WAL while uploading to the cloud (should not be used with python < +3.3). +.TP .B \fB\-\-snappy\fP snappy\-compress the WAL while uploading to the cloud (requires optional \fBpython\-snappy\fP library). .TP +.B \fB\-\-zstd\fP +zstd\-compress the WAL while uploading to the cloud (requires optional \fBzstandard\fP +library). +.TP +.B \fB\-\-lz4\fP +lz4\-compress the WAL while uploading to the cloud (requires optional \fBlz4\fP library). +.TP .B \fB\-\-tags\fP Tags to be added to archived WAL files in cloud storage. .TP diff --git a/docs/_build/man/barman-cloud-wal-restore.1 b/docs/_build/man/barman-cloud-wal-restore.1 index 1a2e81361..696c6ddcd 100644 --- a/docs/_build/man/barman-cloud-wal-restore.1 +++ b/docs/_build/man/barman-cloud-wal-restore.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BARMAN-CLOUD-WAL-RESTORE" "1" "Nov 21, 2024" "3.12" "Barman" +.TH "BARMAN-CLOUD-WAL-RESTORE" "1" "Dec 09, 2024" "3.12" "Barman" .SH NAME barman-cloud-wal-restore \- Barman-cloud Commands .sp diff --git a/docs/_build/man/barman-config-switch.1 b/docs/_build/man/barman-config-switch.1 index 447c31e67..d7caaa5e6 100644 --- a/docs/_build/man/barman-config-switch.1 +++ b/docs/_build/man/barman-config-switch.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BARMAN-CONFIG-SWITCH" "1" "Nov 21, 2024" "3.12" "Barman" +.TH "BARMAN-CONFIG-SWITCH" "1" "Dec 09, 2024" "3.12" "Barman" .SH NAME barman-config-switch \- Barman Sub-Commands .SH SYNOPSIS diff --git a/docs/_build/man/barman-config-update.1 b/docs/_build/man/barman-config-update.1 index 9be5f605c..bb503fc9a 100644 --- a/docs/_build/man/barman-config-update.1 +++ b/docs/_build/man/barman-config-update.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BARMAN-CONFIG-UPDATE" "1" "Nov 21, 2024" "3.12" "Barman" +.TH "BARMAN-CONFIG-UPDATE" "1" "Dec 09, 2024" "3.12" "Barman" .SH NAME barman-config-update \- Barman Sub-Commands .SH SYNOPSIS diff --git a/docs/_build/man/barman-cron.1 b/docs/_build/man/barman-cron.1 index a1dd322dd..1c7a73ba5 100644 --- a/docs/_build/man/barman-cron.1 +++ b/docs/_build/man/barman-cron.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BARMAN-CRON" "1" "Nov 21, 2024" "3.12" "Barman" +.TH "BARMAN-CRON" "1" "Dec 09, 2024" "3.12" "Barman" .SH NAME barman-cron \- Barman Sub-Commands .SH SYNOPSIS diff --git a/docs/_build/man/barman-delete.1 b/docs/_build/man/barman-delete.1 index 828b633e5..70f9d7262 100644 --- a/docs/_build/man/barman-delete.1 +++ b/docs/_build/man/barman-delete.1 @@ -28,7 +28,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BARMAN-DELETE" "1" "Nov 21, 2024" "3.12" "Barman" +.TH "BARMAN-DELETE" "1" "Dec 09, 2024" "3.12" "Barman" .SH NAME barman-delete \- Barman Sub-Commands .SH SYNOPSIS diff --git a/docs/_build/man/barman-diagnose.1 b/docs/_build/man/barman-diagnose.1 index 76d94919f..ae34b9a3c 100644 --- a/docs/_build/man/barman-diagnose.1 +++ b/docs/_build/man/barman-diagnose.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BARMAN-DIAGNOSE" "1" "Nov 21, 2024" "3.12" "Barman" +.TH "BARMAN-DIAGNOSE" "1" "Dec 09, 2024" "3.12" "Barman" .SH NAME barman-diagnose \- Barman Sub-Commands .SH SYNOPSIS diff --git a/docs/_build/man/barman-generate-manifest.1 b/docs/_build/man/barman-generate-manifest.1 index 2d9702112..c0e8e93b8 100644 --- a/docs/_build/man/barman-generate-manifest.1 +++ b/docs/_build/man/barman-generate-manifest.1 @@ -28,7 +28,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BARMAN-GENERATE-MANIFEST" "1" "Nov 21, 2024" "3.12" "Barman" +.TH "BARMAN-GENERATE-MANIFEST" "1" "Dec 09, 2024" "3.12" "Barman" .SH NAME barman-generate-manifest \- Barman Sub-Commands .SH SYNOPSIS diff --git a/docs/_build/man/barman-get-wal.1 b/docs/_build/man/barman-get-wal.1 index 66b65a1b5..c8a873983 100644 --- a/docs/_build/man/barman-get-wal.1 +++ b/docs/_build/man/barman-get-wal.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BARMAN-GET-WAL" "1" "Nov 21, 2024" "3.12" "Barman" +.TH "BARMAN-GET-WAL" "1" "Dec 09, 2024" "3.12" "Barman" .SH NAME barman-get-wal \- Barman Sub-Commands .SH SYNOPSIS diff --git a/docs/_build/man/barman-keep.1 b/docs/_build/man/barman-keep.1 index 82e537f72..e0f2a181b 100644 --- a/docs/_build/man/barman-keep.1 +++ b/docs/_build/man/barman-keep.1 @@ -28,7 +28,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BARMAN-KEEP" "1" "Nov 21, 2024" "3.12" "Barman" +.TH "BARMAN-KEEP" "1" "Dec 09, 2024" "3.12" "Barman" .SH NAME barman-keep \- Barman Sub-Commands .SH SYNOPSIS diff --git a/docs/_build/man/barman-list-files.1 b/docs/_build/man/barman-list-files.1 index 73cea5bde..637269101 100644 --- a/docs/_build/man/barman-list-files.1 +++ b/docs/_build/man/barman-list-files.1 @@ -28,7 +28,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BARMAN-LIST-FILES" "1" "Nov 21, 2024" "3.12" "Barman" +.TH "BARMAN-LIST-FILES" "1" "Dec 09, 2024" "3.12" "Barman" .SH NAME barman-list-files \- Barman Sub-Commands .SH SYNOPSIS diff --git a/docs/_build/man/barman-list-servers.1 b/docs/_build/man/barman-list-servers.1 index 4ce524396..4e60d3a36 100644 --- a/docs/_build/man/barman-list-servers.1 +++ b/docs/_build/man/barman-list-servers.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BARMAN-LIST-SERVERS" "1" "Nov 21, 2024" "3.12" "Barman" +.TH "BARMAN-LIST-SERVERS" "1" "Dec 09, 2024" "3.12" "Barman" .SH NAME barman-list-servers \- Barman Sub-Commands .SH SYNOPSIS diff --git a/docs/_build/man/barman-list_backups.1 b/docs/_build/man/barman-list_backups.1 index 6cd6b2de9..ff850a716 100644 --- a/docs/_build/man/barman-list_backups.1 +++ b/docs/_build/man/barman-list_backups.1 @@ -28,7 +28,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BARMAN-LIST_BACKUPS" "1" "Nov 21, 2024" "3.12" "Barman" +.TH "BARMAN-LIST_BACKUPS" "1" "Dec 09, 2024" "3.12" "Barman" .SH NAME barman-list_backups \- Barman Sub-Commands .SH SYNOPSIS diff --git a/docs/_build/man/barman-lock-directory-cleanup.1 b/docs/_build/man/barman-lock-directory-cleanup.1 index 02b7bd4e2..ef7b44406 100644 --- a/docs/_build/man/barman-lock-directory-cleanup.1 +++ b/docs/_build/man/barman-lock-directory-cleanup.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BARMAN-LOCK-DIRECTORY-CLEANUP" "1" "Nov 21, 2024" "3.12" "Barman" +.TH "BARMAN-LOCK-DIRECTORY-CLEANUP" "1" "Dec 09, 2024" "3.12" "Barman" .SH NAME barman-lock-directory-cleanup \- Barman Sub-Commands .SH SYNOPSIS diff --git a/docs/_build/man/barman-put-wal.1 b/docs/_build/man/barman-put-wal.1 index 278a93302..aa6bb6547 100644 --- a/docs/_build/man/barman-put-wal.1 +++ b/docs/_build/man/barman-put-wal.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BARMAN-PUT-WAL" "1" "Nov 21, 2024" "3.12" "Barman" +.TH "BARMAN-PUT-WAL" "1" "Dec 09, 2024" "3.12" "Barman" .SH NAME barman-put-wal \- Barman Sub-Commands .SH SYNOPSIS diff --git a/docs/_build/man/barman-rebuild-xlogdb.1 b/docs/_build/man/barman-rebuild-xlogdb.1 index 53ec3da31..3c56bc0d8 100644 --- a/docs/_build/man/barman-rebuild-xlogdb.1 +++ b/docs/_build/man/barman-rebuild-xlogdb.1 @@ -28,7 +28,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BARMAN-REBUILD-XLOGDB" "1" "Nov 21, 2024" "3.12" "Barman" +.TH "BARMAN-REBUILD-XLOGDB" "1" "Dec 09, 2024" "3.12" "Barman" .SH NAME barman-rebuild-xlogdb \- Barman Sub-Commands .SH SYNOPSIS diff --git a/docs/_build/man/barman-receive-wal.1 b/docs/_build/man/barman-receive-wal.1 index 05d493a70..6ea1528c0 100644 --- a/docs/_build/man/barman-receive-wal.1 +++ b/docs/_build/man/barman-receive-wal.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BARMAN-RECEIVE-WAL" "1" "Nov 21, 2024" "3.12" "Barman" +.TH "BARMAN-RECEIVE-WAL" "1" "Dec 09, 2024" "3.12" "Barman" .SH NAME barman-receive-wal \- Barman Sub-Commands .SH SYNOPSIS diff --git a/docs/_build/man/barman-replication-status.1 b/docs/_build/man/barman-replication-status.1 index b0d61adab..45791b7cb 100644 --- a/docs/_build/man/barman-replication-status.1 +++ b/docs/_build/man/barman-replication-status.1 @@ -28,7 +28,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BARMAN-REPLICATION-STATUS" "1" "Nov 21, 2024" "3.12" "Barman" +.TH "BARMAN-REPLICATION-STATUS" "1" "Dec 09, 2024" "3.12" "Barman" .SH NAME barman-replication-status \- Barman Sub-Commands .SH SYNOPSIS diff --git a/docs/_build/man/barman-restore.1 b/docs/_build/man/barman-restore.1 index 9e61a1ad5..0fa4ab028 100644 --- a/docs/_build/man/barman-restore.1 +++ b/docs/_build/man/barman-restore.1 @@ -28,7 +28,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BARMAN-RESTORE" "1" "Nov 21, 2024" "3.12" "Barman" +.TH "BARMAN-RESTORE" "1" "Dec 09, 2024" "3.12" "Barman" .SH NAME barman-restore \- Barman Sub-Commands .SH SYNOPSIS diff --git a/docs/_build/man/barman-show-backup.1 b/docs/_build/man/barman-show-backup.1 index 235ce2f98..ecc4fa522 100644 --- a/docs/_build/man/barman-show-backup.1 +++ b/docs/_build/man/barman-show-backup.1 @@ -28,7 +28,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BARMAN-SHOW-BACKUP" "1" "Nov 21, 2024" "3.12" "Barman" +.TH "BARMAN-SHOW-BACKUP" "1" "Dec 09, 2024" "3.12" "Barman" .SH NAME barman-show-backup \- Barman Sub-Commands .SH SYNOPSIS diff --git a/docs/_build/man/barman-show-servers.1 b/docs/_build/man/barman-show-servers.1 index b33f35d9f..7d76291e7 100644 --- a/docs/_build/man/barman-show-servers.1 +++ b/docs/_build/man/barman-show-servers.1 @@ -28,7 +28,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BARMAN-SHOW-SERVERS" "1" "Nov 21, 2024" "3.12" "Barman" +.TH "BARMAN-SHOW-SERVERS" "1" "Dec 09, 2024" "3.12" "Barman" .SH NAME barman-show-servers \- Barman Sub-Commands .SH SYNOPSIS diff --git a/docs/_build/man/barman-status.1 b/docs/_build/man/barman-status.1 index 1da8a8017..b49007e41 100644 --- a/docs/_build/man/barman-status.1 +++ b/docs/_build/man/barman-status.1 @@ -28,7 +28,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BARMAN-STATUS" "1" "Nov 21, 2024" "3.12" "Barman" +.TH "BARMAN-STATUS" "1" "Dec 09, 2024" "3.12" "Barman" .SH NAME barman-status \- Barman Sub-Commands .SH SYNOPSIS diff --git a/docs/_build/man/barman-switch-wal.1 b/docs/_build/man/barman-switch-wal.1 index fc4cff718..1d123566c 100644 --- a/docs/_build/man/barman-switch-wal.1 +++ b/docs/_build/man/barman-switch-wal.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BARMAN-SWITCH-WAL" "1" "Nov 21, 2024" "3.12" "Barman" +.TH "BARMAN-SWITCH-WAL" "1" "Dec 09, 2024" "3.12" "Barman" .SH NAME barman-switch-wal \- Barman Sub-Commands .SH SYNOPSIS diff --git a/docs/_build/man/barman-switch-xlog.1 b/docs/_build/man/barman-switch-xlog.1 index 8c6ecd1a2..3fe4aba82 100644 --- a/docs/_build/man/barman-switch-xlog.1 +++ b/docs/_build/man/barman-switch-xlog.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BARMAN-SWITCH-XLOG" "1" "Nov 21, 2024" "3.12" "Barman" +.TH "BARMAN-SWITCH-XLOG" "1" "Dec 09, 2024" "3.12" "Barman" .SH NAME barman-switch-xlog \- Barman Sub-Commands .SH DESCRIPTION diff --git a/docs/_build/man/barman-sync-backup.1 b/docs/_build/man/barman-sync-backup.1 index c7c1d1829..9e1edd831 100644 --- a/docs/_build/man/barman-sync-backup.1 +++ b/docs/_build/man/barman-sync-backup.1 @@ -28,7 +28,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BARMAN-SYNC-BACKUP" "1" "Nov 21, 2024" "3.12" "Barman" +.TH "BARMAN-SYNC-BACKUP" "1" "Dec 09, 2024" "3.12" "Barman" .SH NAME barman-sync-backup \- Barman Sub-Commands .SH SYNOPSIS diff --git a/docs/_build/man/barman-sync-info.1 b/docs/_build/man/barman-sync-info.1 index 732f030b2..202d44fbc 100644 --- a/docs/_build/man/barman-sync-info.1 +++ b/docs/_build/man/barman-sync-info.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BARMAN-SYNC-INFO" "1" "Nov 21, 2024" "3.12" "Barman" +.TH "BARMAN-SYNC-INFO" "1" "Dec 09, 2024" "3.12" "Barman" .SH NAME barman-sync-info \- Barman Sub-Commands .SH SYNOPSIS diff --git a/docs/_build/man/barman-sync-wals.1 b/docs/_build/man/barman-sync-wals.1 index 5ad8c5197..4f08aba08 100644 --- a/docs/_build/man/barman-sync-wals.1 +++ b/docs/_build/man/barman-sync-wals.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BARMAN-SYNC-WALS" "1" "Nov 21, 2024" "3.12" "Barman" +.TH "BARMAN-SYNC-WALS" "1" "Dec 09, 2024" "3.12" "Barman" .SH NAME barman-sync-wals \- Barman Sub-Commands .SH SYNOPSIS diff --git a/docs/_build/man/barman-verify-backup.1 b/docs/_build/man/barman-verify-backup.1 index a450f79cc..a5e8c8433 100644 --- a/docs/_build/man/barman-verify-backup.1 +++ b/docs/_build/man/barman-verify-backup.1 @@ -28,7 +28,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BARMAN-VERIFY-BACKUP" "1" "Nov 21, 2024" "3.12" "Barman" +.TH "BARMAN-VERIFY-BACKUP" "1" "Dec 09, 2024" "3.12" "Barman" .SH NAME barman-verify-backup \- Barman Sub-Commands .SH SYNOPSIS diff --git a/docs/_build/man/barman-verify.1 b/docs/_build/man/barman-verify.1 index 2c0db5e75..ccbbba9bb 100644 --- a/docs/_build/man/barman-verify.1 +++ b/docs/_build/man/barman-verify.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BARMAN-VERIFY" "1" "Nov 21, 2024" "3.12" "Barman" +.TH "BARMAN-VERIFY" "1" "Dec 09, 2024" "3.12" "Barman" .SH NAME barman-verify \- Barman Sub-Commands .SH DESCRIPTION diff --git a/docs/_build/man/barman-wal-archive.1 b/docs/_build/man/barman-wal-archive.1 index 58cb9d6a4..f1878a0f1 100644 --- a/docs/_build/man/barman-wal-archive.1 +++ b/docs/_build/man/barman-wal-archive.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BARMAN-WAL-ARCHIVE" "1" "Nov 21, 2024" "3.12" "Barman" +.TH "BARMAN-WAL-ARCHIVE" "1" "Dec 09, 2024" "3.12" "Barman" .SH NAME barman-wal-archive \- Barman-cli Commands .SH SYNOPSIS @@ -42,6 +42,7 @@ barman\-wal\-archive [ \-\-port PORT ] [ { \-c, \-\-config } CONFIG ] [ { \-t \-\-test } ] + [ \-\-md5 ] BARMAN_HOST SERVER_NAME WAL_PATH .EE .UNINDENT @@ -93,6 +94,12 @@ Specify the configuration file on the Barman server. Test the connection and configuration of the specified Postgres server in Barman to ensure it is ready to receive WAL files. This option ignores the mandatory arguments \fBWAL_NAME\fP and \fBWAL_DEST\fP\&. +.TP +.B \fB\-\-md5\fP +Use MD5 instead of SHA256 as the hash algorithm to calculate the checksum of the WAL +file when transmitting it to the Barman server. This is used to maintain +compatibility with older server versions, as older versions of Barman server used to +support only MD5. .UNINDENT .SH AUTHOR EnterpriseDB diff --git a/docs/_build/man/barman-wal-restore.1 b/docs/_build/man/barman-wal-restore.1 index b88c88958..548098433 100644 --- a/docs/_build/man/barman-wal-restore.1 +++ b/docs/_build/man/barman-wal-restore.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BARMAN-WAL-RESTORE" "1" "Nov 21, 2024" "3.12" "Barman" +.TH "BARMAN-WAL-RESTORE" "1" "Dec 09, 2024" "3.12" "Barman" .SH NAME barman-wal-restore \- Barman-cli Commands .SH SYNOPSIS @@ -46,6 +46,7 @@ barman\-wal\-restore [ { \-P, \-\-partial } ] [ { \-z, \-\-gzip } ] [ { \-j, \-\-bzip2 } ] + [ \-\-keep\-compression ] [ { \-c, \-\-config } CONFIG ] [ { \-t \-\-test } ] BARMAN_HOST SERVER_NAME WAL_NAME WAL_DEST diff --git a/docs/_build/man/barman.1 b/docs/_build/man/barman.1 index 8ae8e747d..05705ddb5 100644 --- a/docs/_build/man/barman.1 +++ b/docs/_build/man/barman.1 @@ -28,7 +28,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BARMAN" "1" "Nov 21, 2024" "3.12" "Barman" +.TH "BARMAN" "1" "Dec 09, 2024" "3.12" "Barman" .SH NAME barman \- Barman Commands .sp @@ -1815,6 +1815,7 @@ barman\-wal\-archive [ \-\-port PORT ] [ { \-c, \-\-config } CONFIG ] [ { \-t \-\-test } ] + [ \-\-md5 ] BARMAN_HOST SERVER_NAME WAL_PATH .EE .UNINDENT @@ -1866,6 +1867,12 @@ Specify the configuration file on the Barman server. Test the connection and configuration of the specified Postgres server in Barman to ensure it is ready to receive WAL files. This option ignores the mandatory arguments \fBWAL_NAME\fP and \fBWAL_DEST\fP\&. +.TP +.B \fB\-\-md5\fP +Use MD5 instead of SHA256 as the hash algorithm to calculate the checksum of the WAL +file when transmitting it to the Barman server. This is used to maintain +compatibility with older server versions, as older versions of Barman server used to +support only MD5. .UNINDENT .SS \fBbarman\-wal\-restore\fP .SS Synopsis @@ -1884,6 +1891,7 @@ barman\-wal\-restore [ { \-P, \-\-partial } ] [ { \-z, \-\-gzip } ] [ { \-j, \-\-bzip2 } ] + [ \-\-keep\-compression ] [ { \-c, \-\-config } CONFIG ] [ { \-t \-\-test } ] BARMAN_HOST SERVER_NAME WAL_NAME WAL_DEST diff --git a/docs/_build/man/barman.5 b/docs/_build/man/barman.5 index 5e9ebde59..d976aca0e 100644 --- a/docs/_build/man/barman.5 +++ b/docs/_build/man/barman.5 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "BARMAN" "5" "Nov 21, 2024" "3.12" "Barman" +.TH "BARMAN" "5" "Dec 09, 2024" "3.12" "Barman" .SH NAME barman \- Barman Configurations .sp @@ -735,6 +735,73 @@ Only supported when \fBbackup_method = snapshot\fP and \fBsnapshot_provider = aw .sp Scope: Global / Server / Model. .sp +\fBaws_snapshot_lock_mode\fP +.sp +The lock mode for the snapshot. This is only valid if \fBsnapshot_instance\fP and +\fBsnapshot_disk\fP are set. +.sp +Allowed options: +.INDENT 0.0 +.IP \(bu 2 +\fBcompliance\fP\&. +.IP \(bu 2 +\fBgovernance\fP\&. +.UNINDENT +.sp +\fBNOTE:\fP +.INDENT 0.0 +.INDENT 3.5 +Only supported when \fBbackup_method = snapshot\fP and \fBsnapshot_provider = aws\fP\&. +.UNINDENT +.UNINDENT +.sp +Scope: Global / Server / Model. +.sp +\fBaws_snapshot_lock_duration\fP +.sp +The lock duration is the period of time (in days) for which the snapshot is to remain +locked, ranging from 1 to 36,500. Set either the lock duration or the expiration date +(not both). +.sp +\fBNOTE:\fP +.INDENT 0.0 +.INDENT 3.5 +Only supported when \fBbackup_method = snapshot\fP and \fBsnapshot_provider = aws\fP\&. +.UNINDENT +.UNINDENT +.sp +Scope: Global / Server / Model. +.sp +\fBaws_snapshot_lock_cool_off_period\fP +.sp +The cooling\-off period is an optional period of time (in hours) that you can specify +when you lock a snapshot in \fBcompliance\fP mode, ranging from 1 to 72. +.sp +\fBNOTE:\fP +.INDENT 0.0 +.INDENT 3.5 +Only supported when \fBbackup_method = snapshot\fP and \fBsnapshot_provider = aws\fP\&. +.UNINDENT +.UNINDENT +.sp +Scope: Global / Server / Model. +.sp +\fBaws_snapshot_lock_expiration_date\fP +.sp +The lock duration is determined by an expiration date in the future. It must be at least +1 day after the snapshot creation date and time, using the format +\fBYYYY\-MM\-DDTHH:MM:SS.sssZ\fP\&. Set either the lock duration or the expiration date (not +both). +.sp +\fBNOTE:\fP +.INDENT 0.0 +.INDENT 3.5 +Only supported when \fBbackup_method = snapshot\fP and \fBsnapshot_provider = aws\fP\&. +.UNINDENT +.UNINDENT +.sp +Scope: Global / Server / Model. +.sp \fBazure_credential\fP .sp Specifies the type of Azure credential to use for authentication, either \fBazure\-cli\fP diff --git a/docs/conf.py b/docs/conf.py index e1ec233a8..764347b5f 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -34,6 +34,7 @@ import os import sys +from datetime import datetime sys.path.insert(0, os.path.abspath("..")) @@ -44,6 +45,11 @@ module_dir = os.path.abspath(os.path.join(project_root, "barman")) excludes = ["tests", "setup.py", "conf"] +release_date = os.getenv("SPHINX_BUILD_DATE") +if release_date: + release_date = datetime.strptime(release_date, "%b %d, %Y").date() + today = release_date.strftime("%b %d, %Y") + # -- General configuration ------------------------------------------------ # If your documentation needs a minimal Sphinx version, state it here. diff --git a/docs/user_guide/commands/barman_cli/wal_archive.inc.rst b/docs/user_guide/commands/barman_cli/wal_archive.inc.rst index 8ee1ff082..0779e2ec7 100644 --- a/docs/user_guide/commands/barman_cli/wal_archive.inc.rst +++ b/docs/user_guide/commands/barman_cli/wal_archive.inc.rst @@ -15,6 +15,7 @@ Synopsis [ --port PORT ] [ { -c, --config } CONFIG ] [ { -t --test } ] + [ --md5 ] BARMAN_HOST SERVER_NAME WAL_PATH Description @@ -63,3 +64,9 @@ Parameters Test the connection and configuration of the specified Postgres server in Barman to ensure it is ready to receive WAL files. This option ignores the mandatory arguments ``WAL_NAME`` and ``WAL_DEST``. + +``--md5`` + Use MD5 instead of SHA256 as the hash algorithm to calculate the checksum of the WAL + file when transmitting it to the Barman server. This is used to maintain + compatibility with older server versions, as older versions of Barman server used to + support only MD5. diff --git a/docs/user_guide/commands/barman_cli/wal_restore.inc.rst b/docs/user_guide/commands/barman_cli/wal_restore.inc.rst index 42128a74b..762d369e0 100644 --- a/docs/user_guide/commands/barman_cli/wal_restore.inc.rst +++ b/docs/user_guide/commands/barman_cli/wal_restore.inc.rst @@ -19,6 +19,7 @@ Synopsis [ { -P, --partial } ] [ { -z, --gzip } ] [ { -j, --bzip2 } ] + [ --keep-compression ] [ { -c, --config } CONFIG ] [ { -t --test } ] BARMAN_HOST SERVER_NAME WAL_NAME WAL_DEST diff --git a/docs/user_guide/commands/barman_cloud/backup.inc.rst b/docs/user_guide/commands/barman_cloud/backup.inc.rst index 9f7288918..602ed6de0 100644 --- a/docs/user_guide/commands/barman_cloud/backup.inc.rst +++ b/docs/user_guide/commands/barman_cloud/backup.inc.rst @@ -154,7 +154,7 @@ uploaded to the cloud. Name of a disk from which snapshots should be taken. ``--tags`` - Tags to be added to archived WAL files in cloud storage and to snapshots created, if + Tags to be added to all uploaded files in cloud storage, and/or to snapshots created, if snapshots are used. **Extra options for the AWS cloud provider** diff --git a/docs/user_guide/commands/barman_cloud/wal_archive.inc.rst b/docs/user_guide/commands/barman_cloud/wal_archive.inc.rst index 607530947..4fc239f67 100644 --- a/docs/user_guide/commands/barman_cloud/wal_archive.inc.rst +++ b/docs/user_guide/commands/barman_cloud/wal_archive.inc.rst @@ -14,9 +14,7 @@ [ { -q | --quiet } ] [ { -t | --test } ] [ --cloud-provider { aws-s3 | azure-blob-storage | google-cloud-storage } ] - [ { -z | --gzip } ] - [ { -j | --bzip2 } ] - [ --snappy ] + [ { { -z | --gzip } | { -j | --bzip2 } | --xz | --snappy | --zstd | --lz4 } ] [ --tags [ TAGS ... ] ] [ --history-tags [ HISTORY_TAGS ... ] ] [ --endpoint-url ENDPOINT_URL ] @@ -92,10 +90,21 @@ Barman server. Additionally, it can be utilized as a hook script for WAL archivi bzip2-compress the WAL while uploading to the cloud (should not be used with python < 3.3). +``--xz`` + xz-compress the WAL while uploading to the cloud (should not be used with python < + 3.3). + ``--snappy`` snappy-compress the WAL while uploading to the cloud (requires optional ``python-snappy`` library). +``--zstd`` + zstd-compress the WAL while uploading to the cloud (requires optional ``zstandard`` + library). + +``--lz4`` + lz4-compress the WAL while uploading to the cloud (requires optional ``lz4`` library). + ``--tags`` Tags to be added to archived WAL files in cloud storage. diff --git a/docs/user_guide/configuration.rst b/docs/user_guide/configuration.rst index 5749c0755..5c77966f4 100644 --- a/docs/user_guide/configuration.rst +++ b/docs/user_guide/configuration.rst @@ -612,6 +612,54 @@ Indicates the AWS region where the EC2 VM and storage volumes, as defined by Scope: Global / Server / Model. +**aws_snapshot_lock_mode** + +The lock mode for the snapshot. This is only valid if ``snapshot_instance`` and +``snapshot_disk`` are set. + +Allowed options: + +* ``compliance``. +* ``governance``. + +.. note:: + Only supported when ``backup_method = snapshot`` and ``snapshot_provider = aws``. + +Scope: Global / Server / Model. + +**aws_snapshot_lock_duration** + +The lock duration is the period of time (in days) for which the snapshot is to remain +locked, ranging from 1 to 36,500. Set either the lock duration or the expiration date +(not both). + +.. note:: + Only supported when ``backup_method = snapshot`` and ``snapshot_provider = aws``. + +Scope: Global / Server / Model. + +**aws_snapshot_lock_cool_off_period** + +The cooling-off period is an optional period of time (in hours) that you can specify +when you lock a snapshot in ``compliance`` mode, ranging from 1 to 72. + +.. note:: + Only supported when ``backup_method = snapshot`` and ``snapshot_provider = aws``. + +Scope: Global / Server / Model. + +**aws_snapshot_lock_expiration_date** + +The lock duration is determined by an expiration date in the future. It must be at least +1 day after the snapshot creation date and time, using the format +``YYYY-MM-DDTHH:MM:SS.sssZ``. Set either the lock duration or the expiration date (not +both). + +.. note:: + Only supported when ``backup_method = snapshot`` and ``snapshot_provider = aws``. + +Scope: Global / Server / Model. + **azure_credential** Specifies the type of Azure credential to use for authentication, either ``azure-cli`` diff --git a/tests/test_barman_cloud_backup_show.py b/tests/test_barman_cloud_backup_show.py index 4c42c1093..c2cde0bfb 100644 --- a/tests/test_barman_cloud_backup_show.py +++ b/tests/test_barman_cloud_backup_show.py @@ -19,6 +19,7 @@ import datetime import json +import dateutil import mock import pytest from testing_helpers import build_test_backup_info @@ -40,9 +41,13 @@ def backup_id(self): def cloud_backup_catalog(self, backup_id): backup_info = build_test_backup_info( backup_id="backup_id_1", - begin_time=datetime.datetime(2038, 1, 19, 3, 14, 8), + begin_time=datetime.datetime( + 2038, 1, 19, 3, 14, 8, tzinfo=dateutil.tz.tzutc() + ), begin_wal="000000010000000000000002", - end_time=datetime.datetime(2038, 1, 19, 4, 14, 8), + end_time=datetime.datetime( + 2038, 1, 19, 4, 14, 8, tzinfo=dateutil.tz.tzutc() + ), end_wal="000000010000000000000004", size=2048, data_checksums="on", @@ -133,8 +138,8 @@ def test_cloud_backup_show( " Timeline : 1\n" " Begin WAL : 000000010000000000000002\n" " End WAL : 000000010000000000000004\n" - " Begin time : 2038-01-19 03:14:08\n" - " End time : 2038-01-19 04:14:08\n" + " Begin time : 2038-01-19 03:14:08+00:00\n" + " End time : 2038-01-19 04:14:08+00:00\n" " Begin Offset : 40\n" " End Offset : 184\n" " Begin LSN : 0/2000028\n" @@ -166,7 +171,8 @@ def test_cloud_backup_show_json( assert json.loads(out)["main"] == { "backup_label": None, "begin_offset": 40, - "begin_time": "2038-01-19T03:14:08", + "begin_time": "Tue Jan 19 03:14:08 2038", + "begin_time_iso": "2038-01-19T03:14:08+00:00", "begin_wal": "000000010000000000000002", "begin_xlog": "0/2000028", "children_backup_ids": None, @@ -177,7 +183,8 @@ def test_cloud_backup_show_json( "data_checksums": "on", "deduplicated_size": 1024, "end_offset": 184, - "end_time": "2038-01-19T04:14:08", + "end_time": "Tue Jan 19 04:14:08 2038", + "end_time_iso": "2038-01-19T04:14:08+00:00", "end_wal": "000000010000000000000004", "end_xlog": "0/20000B8", "error": None, diff --git a/tests/test_sync.py b/tests/test_sync.py index b65aa8616..f0ed2f8cc 100644 --- a/tests/test_sync.py +++ b/tests/test_sync.py @@ -20,6 +20,7 @@ from datetime import datetime, timedelta import dateutil +import dateutil.tz import mock import pytest from dateutil import tz @@ -50,14 +51,16 @@ "deduplicated_size": 1024, "version": 90302, "ident_file": "/pgdata/location/pg_ident.conf", - "end_time": "2014-07-23T12:00:43", + "end_time": "Wed Jul 23 12:00:43 2014", + "end_time_iso": "2014-07-23T12:00:43+02:00", "status": "DONE", "backup_id": "1234567890", "config_file": "/pgdata/location/postgresql.conf", "timeline": 1, "end_xlog": "0/20000B8", "pgdata": "/pgdata/location", - "begin_time": "2014-07-23T11:00:43", + "begin_time": "Wed Jul 23 11:00:43 2014", + "begin_time_iso": "2014-07-23T11:00:43+02:00", "hba_file": "/pgdata/location/pg_hba.conf", "end_offset": 184, "tablespaces": [ @@ -199,8 +202,8 @@ def test_status(self, capsys, tmpdir): server.get_available_backups = lambda: { "1234567890": build_test_backup_info( server=server, - begin_time=dateutil.parser.parse("Wed Jul 23 11:00:43 2014"), - end_time=dateutil.parser.parse("Wed Jul 23 12:00:43 2014"), + begin_time=dateutil.parser.parse("2014-07-23T11:00:43+02:00"), + end_time=dateutil.parser.parse("2014-07-23T12:00:43+02:00"), ) } diff --git a/tox.ini b/tox.ini index eea3e0de0..6255d54d3 100644 --- a/tox.ini +++ b/tox.ini @@ -50,6 +50,7 @@ deps = sphinx myst_parser setenv = PYTHONPATH=. +passenv = SPHINX_BUILD_DATE commands = make -C docs {posargs:html man} allowlist_externals = make