Hello,
I am having an issue with our Barman 3.15 setup.
It has a launch daemon that creates a new backup of our PostgreSQL database every day at 4 a.m. and then restores it to a secondary server.
This has been working great, until this morning. Now, both the "barman backup" and "barman recover" command return the following:
Processing xlog segments from file archival for pg_live
00000001000008730000001F
EXCEPTION: 'utf-8' codec can't decode byte 0xcd in position 61: invalid continuation byte
See log file for more details.
I thought creating a new base backup would solve the issue, but it keeps returning the error above. Despite the error, it does list a new backup on the Barman server, but I am unable to restore it.
Any idea how to resolve this?
We are running Barman 3.15 on macOS 15.3.1
Full barman log output below.
Kind regards,
Stan
2025-10-01 13:07:32,310 [86549] barman.backup INFO: Starting backup using postgres method for server pg_live in /Volumes/BarmanData/postgres/barman/pg_live/base/20251001T130732
2025-10-01 13:07:32,347 [86549] barman.backup_executor INFO: Backup start at LSN: 877/722BEA10 (000000010000087700000072, 002BEA10)
2025-10-01 13:07:32,347 [86549] barman.backup_executor INFO: Starting backup copy via pg_basebackup for 20251001T130732
2025-10-01 13:07:32,470 [86549] barman.backup_executor INFO: pg_basebackup: initiating base backup, waiting for checkpoint to complete
2025-10-01 13:07:32,945 [1038] barman.command_wrappers INFO: pg_live: pg_receivewal: finished segment at 877/73000000 (timeline 1)
2025-10-01 13:07:33,173 [86556] barman.server INFO: Received file '000000010000087700000072' with checksum '2d7047c48806c130083ab38511fc043d0cff188523ffe8e2ddc78eba2c9747b1' by put-wal for server 'pg_live' (SSH host: 192.163.1.33)
2025-10-01 13:08:37,775 [86549] barman.backup_executor INFO: pg_basebackup: checkpoint completed
2025-10-01 13:20:40,987 [1038] barman.command_wrappers INFO: pg_live: pg_receivewal: finished segment at 877/74000000 (timeline 1)
2025-10-01 13:20:41,740 [86911] barman.server INFO: Received file '000000010000087700000073' with checksum '34c5a48eefeeb2ef638800df059f343893c62e1bf8aaedc9ac83ceea753af510' by put-wal for server 'pg_live' (SSH host: 192.163.1.33)
2025-10-01 13:33:41,120 [1038] barman.command_wrappers INFO: pg_live: pg_receivewal: finished segment at 877/75000000 (timeline 1)
2025-10-01 13:33:41,922 [87282] barman.server INFO: Received file '000000010000087700000074' with checksum '651100cefb6fda953d63d1aa63070b088147f5792d75c60824ac87f930796475' by put-wal for server 'pg_live' (SSH host: 192.163.1.33)
2025-10-01 13:41:32,484 [1038] barman.command_wrappers INFO: pg_live: pg_receivewal: finished segment at 877/76000000 (timeline 1)
2025-10-01 13:41:33,238 [87500] barman.server INFO: Received file '000000010000087700000075' with checksum '522f7e8292e59feaeb3798436ed2e1425d31327dd5f1faefa8451841fc416f5a' by put-wal for server 'pg_live' (SSH host: 192.163.1.33)
2025-10-01 13:53:42,896 [1038] barman.command_wrappers INFO: pg_live: pg_receivewal: finished segment at 877/77000000 (timeline 1)
2025-10-01 13:53:43,717 [87865] barman.server INFO: Received file '000000010000087700000076' with checksum 'ae0e1241514c91f18ddb593ad0d415d03debf4d575f58b2067f6eb727da9f7fa' by put-wal for server 'pg_live' (SSH host: 192.163.1.33)
2025-10-01 14:03:54,506 [1038] barman.command_wrappers INFO: pg_live: pg_receivewal: finished segment at 877/78000000 (timeline 1)
2025-10-01 14:03:55,260 [88157] barman.server INFO: Received file '000000010000087700000077' with checksum 'f4278a55879823048a412daf5706c191f131c25cef74bc6da822163749495209' by put-wal for server 'pg_live' (SSH host: 192.163.1.33)
2025-10-01 14:08:44,749 [1038] barman.command_wrappers INFO: pg_live: pg_receivewal: finished segment at 877/79000000 (timeline 1)
2025-10-01 14:08:45,482 [88286] barman.server INFO: Received file '000000010000087700000078' with checksum 'e333b85556d11a31ed64971f927d0a2879e11caed3ef84c194b2a12f81ee9e93' by put-wal for server 'pg_live' (SSH host: 192.163.1.33)
2025-10-01 14:13:03,842 [1038] barman.command_wrappers INFO: pg_live: pg_receivewal: finished segment at 877/7A000000 (timeline 1)
2025-10-01 14:13:04,569 [88407] barman.server INFO: Received file '000000010000087700000079' with checksum '894d21f2c4b8b14056dc76ab17f06c00d22887098c2361d8c1957d4ca7d12c1c' by put-wal for server 'pg_live' (SSH host: 192.163.1.33)
2025-10-01 14:22:08,280 [1038] barman.command_wrappers INFO: pg_live: pg_receivewal: finished segment at 877/7B000000 (timeline 1)
2025-10-01 14:22:09,011 [88675] barman.server INFO: Received file '00000001000008770000007A' with checksum 'c83a65efdf9e60d2b8a3fa915ffc8ca737153fe6a12feca844cf9882d286bbd9' by put-wal for server 'pg_live' (SSH host: 192.163.1.33)
2025-10-01 14:28:19,708 [1038] barman.command_wrappers INFO: pg_live: pg_receivewal: finished segment at 877/7C000000 (timeline 1)
2025-10-01 14:28:20,095 [88858] barman.server INFO: Received file '00000001000008770000007B' with checksum '00d9fcce2e969f1fd7cff9afc8485def0372d0b0d7c9c529ac522bc368fdca02' by put-wal for server 'pg_live' (SSH host: 192.163.1.33)
2025-10-01 14:32:06,376 [1038] barman.command_wrappers INFO: pg_live: pg_receivewal: finished segment at 877/7D000000 (timeline 1)
2025-10-01 14:32:06,925 [88969] barman.server INFO: Received file '00000001000008770000007C' with checksum 'c02177ffdf8bfcc4c4a7e035ace8d94fd712a99391ea433af6632515dee2c9ef' by put-wal for server 'pg_live' (SSH host: 192.163.1.33)
2025-10-01 14:32:07,484 [88974] barman.server INFO: Received file '000000010000087700000073.000A3A48.backup' with checksum 'f341773294492744145c8e734e13943eb3075ea8cba65542f6cef645e1827ad7' by put-wal for server 'pg_live' (SSH host: 192.163.1.33)
2025-10-01 14:32:08,112 [86549] barman.backup_executor INFO: NOTICE: all required WAL segments have been archived
2025-10-01 14:32:08,157 [86549] barman.backup_executor INFO: pg_basebackup: syncing data to disk ...
2025-10-01 14:32:08,500 [86549] barman.backup_executor INFO: pg_basebackup: renaming backup_manifest.tmp to backup_manifest
2025-10-01 14:32:08,500 [86549] barman.backup_executor INFO: pg_basebackup: base backup completed
2025-10-01 14:32:08,501 [86549] barman.backup_executor INFO:
2025-10-01 14:32:08,502 [86549] barman.backup_executor INFO: Copy done (time: 1 hour, 24 minutes, 36 seconds)
2025-10-01 14:32:08,516 [86549] barman.backup_executor INFO: Finalising the backup.
2025-10-01 14:32:09,180 [86549] barman.postgres INFO: Restore point 'barman_20251001T130732' successfully created
2025-10-01 14:32:09,284 [86549] barman.backup INFO: Backup size: 230.9 GiB
2025-10-01 14:32:09,284 [86549] barman.backup INFO: Backup end at LSN: 877/7D028970 (00000001000008770000007D, 00028970)
2025-10-01 14:32:09,285 [86549] barman.backup INFO: Backup completed (start time: 2025-10-01 13:07:32.348089, elapsed time: 1 hour, 24 minutes, 36 seconds)
2025-10-01 14:32:09,305 [86549] barman.wal_archiver INFO: Found 19 xlog segments from streaming for pg_live. Archive a batch of 18 segments in this run.
2025-10-01 14:32:09,305 [86549] barman.wal_archiver INFO: Archiving segment 1 of 18 from streaming: pg_live/00000001000008770000006B
2025-10-01 14:32:09,306 [86549] barman.wal_archiver INFO: Archiving segment 2 of 18 from streaming: pg_live/00000001000008770000006C
2025-10-01 14:32:09,306 [86549] barman.wal_archiver INFO: Archiving segment 3 of 18 from streaming: pg_live/00000001000008770000006D
2025-10-01 14:32:09,307 [86549] barman.wal_archiver INFO: Archiving segment 4 of 18 from streaming: pg_live/00000001000008770000006E
2025-10-01 14:32:09,307 [86549] barman.wal_archiver INFO: Archiving segment 5 of 18 from streaming: pg_live/00000001000008770000006F
2025-10-01 14:32:09,308 [86549] barman.wal_archiver INFO: Archiving segment 6 of 18 from streaming: pg_live/000000010000087700000070
2025-10-01 14:32:09,309 [86549] barman.wal_archiver INFO: Archiving segment 7 of 18 from streaming: pg_live/000000010000087700000071
2025-10-01 14:32:09,309 [86549] barman.wal_archiver INFO: Archiving segment 8 of 18 from streaming: pg_live/000000010000087700000072
2025-10-01 14:32:09,310 [86549] barman.wal_archiver INFO: Archiving segment 9 of 18 from streaming: pg_live/000000010000087700000073
2025-10-01 14:32:09,310 [86549] barman.wal_archiver INFO: Archiving segment 10 of 18 from streaming: pg_live/000000010000087700000074
2025-10-01 14:32:09,311 [86549] barman.wal_archiver INFO: Archiving segment 11 of 18 from streaming: pg_live/000000010000087700000075
2025-10-01 14:32:09,312 [86549] barman.wal_archiver INFO: Archiving segment 12 of 18 from streaming: pg_live/000000010000087700000076
2025-10-01 14:32:09,313 [86549] barman.wal_archiver INFO: Archiving segment 13 of 18 from streaming: pg_live/000000010000087700000077
2025-10-01 14:32:09,319 [86549] barman.wal_archiver INFO: Archiving segment 14 of 18 from streaming: pg_live/000000010000087700000078
2025-10-01 14:32:09,320 [86549] barman.wal_archiver INFO: Archiving segment 15 of 18 from streaming: pg_live/000000010000087700000079
2025-10-01 14:32:09,321 [86549] barman.wal_archiver INFO: Archiving segment 16 of 18 from streaming: pg_live/00000001000008770000007A
2025-10-01 14:32:09,322 [86549] barman.wal_archiver INFO: Archiving segment 17 of 18 from streaming: pg_live/00000001000008770000007B
2025-10-01 14:32:09,322 [86549] barman.wal_archiver INFO: Archiving segment 18 of 18 from streaming: pg_live/00000001000008770000007C
2025-10-01 14:32:09,495 [1038] barman.command_wrappers INFO: pg_live: pg_receivewal: finished segment at 877/7E000000 (timeline 1)
2025-10-01 14:32:09,713 [88978] barman.server INFO: Received file '00000001000008770000007D' with checksum '9ba975df7c70490bef41aef9897650a01470d3a19c87a5302c89e5de701051cc' by put-wal for server 'pg_live' (SSH host: 192.163.1.33)
2025-10-01 14:32:16,878 [86549] barman.wal_archiver INFO: Found 1120 xlog segments from file archival for pg_live. Archive all segments in one run.
2025-10-01 14:32:16,878 [86549] barman.wal_archiver INFO: Archiving segment 1 of 1120 from file archival: pg_live/00000001000008730000001F
2025-10-01 14:32:16,911 [86549] barman.cli ERROR: 'utf-8' codec can't decode byte 0xcd in position 61: invalid continuation byte
See log file for more details.
Traceback (most recent call last):
File "/opt/macports-bin-pkg-version/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/barman/cli.py", line 2673, in main
args.func(args)
~~~~~~~~~^^^^^^
File "/opt/macports-bin-pkg-version/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/barman/cli.py", line 609, in backup
server.backup(
~~~~~~~~~~~~~^
wait=args.wait,
^^^^^^^^^^^^^^^
...<2 lines>...
**incremental_kwargs,
^^^^^^^^^^^^^^^^^^^^^
)
^
File "/opt/macports-bin-pkg-version/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/barman/server.py", line 1817, in backup
self.archive_wal(verbose=False)
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
File "/opt/macports-bin-pkg-version/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/barman/server.py", line 3069, in archive_wal
self.backup_manager.archive_wal(verbose)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "/opt/macports-bin-pkg-version/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/barman/backup.py", line 1201, in archive_wal
archiver.archive(verbose)
~~~~~~~~~~~~~~~~^^^^^^^^^
File "/opt/macports-bin-pkg-version/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/barman/wal_archiver.py", line 189, in archive
self.archive_wal(compressor, encryption, wal_info)
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/macports-bin-pkg-version/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/barman/wal_archiver.py", line 294, in archive_wal
dst_info = self.backup_manager.get_wal_file_info(dst_file)
File "/opt/macports-bin-pkg-version/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/barman/backup.py", line 1931, in get_wal_file_info
return WalFileInfo.from_file(
~~~~~~~~~~~~~~~~~~~~~^
filename,
^^^^^^^^^
...<2 lines>...
encryption_manager=self.encryption_manager,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/opt/macports-bin-pkg-version/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/barman/infofile.py", line 416, in from_file
kwargs["encryption"] = encryption_manager.identify_encryption(filename)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
File "/opt/macports-bin-pkg-version/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/barman/encryption.py", line 319, in identify_encryption
if klass.recognize_encryption(filename):
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
File "/opt/macports-bin-pkg-version/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/barman/encryption.py", line 215, in recognize_encryption
process = subprocess.run(
["file", "--brief", filename],
...<3 lines>...
text=True,
)
File "/opt/macports-bin-pkg-version/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/subprocess.py", line 556, in run
stdout, stderr = process.communicate(input, timeout=timeout)
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/macports-bin-pkg-version/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/subprocess.py", line 1222, in communicate
stdout, stderr = self._communicate(input, endtime, timeout)
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/macports-bin-pkg-version/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/subprocess.py", line 2169, in _communicate
stdout = self._translate_newlines(stdout,
self.stdout.encoding,
self.stdout.errors)
File "/opt/macports-bin-pkg-version/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/subprocess.py", line 1099, in _translate_newlines
data = data.decode(encoding, errors)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xcd in position 61: invalid continuation byte
2025-10-01 14:32:19,179 [88999] barman.wal_archiver INFO: Found 2 xlog segments from streaming for pg_live. Archive a batch of 1 segments in this run.
2025-10-01 14:32:19,180 [88999] barman.wal_archiver INFO: Archiving segment 1 of 1 from streaming: pg_live/00000001000008770000007D
2025-10-01 14:32:19,206 [88999] barman.wal_archiver INFO: Found 1121 xlog segments from file archival for pg_live. Archive all segments in one run.
2025-10-01 14:32:19,206 [88999] barman.wal_archiver INFO: Archiving segment 1 of 1121 from file archival: pg_live/00000001000008730000001F
2025-10-01 14:32:19,211 [88999] barman.cli ERROR: 'utf-8' codec can't decode byte 0xcd in position 61: invalid continuation byte
See log file for more details.
Traceback (most recent call last):
File "/opt/macports-bin-pkg-version/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/barman/cli.py", line 2673, in main
args.func(args)
~~~~~~~~~^^^^^^
File "/opt/macports-bin-pkg-version/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/barman/cli.py", line 1302, in restore
server.recover(
~~~~~~~~~~~~~~^
backup_info,
^^^^^^^^^^^^
...<14 lines>...
**snapshot_kwargs,
^^^^^^^^^^^^^^^^^^
)
^
File "/opt/macports-bin-pkg-version/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/barman/server.py", line 2330, in recover
return self.backup_manager.recover(
~~~~~~~~~~~~~~~~~~~~~~~~~~~^
backup_info, dest, wal_dest, tablespaces, remote_command, **kwargs
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/opt/macports-bin-pkg-version/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/barman/backup.py", line 1104, in recover
self.server.archive_wal(verbose=False)
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
File "/opt/macports-bin-pkg-version/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/barman/server.py", line 3069, in archive_wal
self.backup_manager.archive_wal(verbose)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "/opt/macports-bin-pkg-version/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/barman/backup.py", line 1201, in archive_wal
archiver.archive(verbose)
~~~~~~~~~~~~~~~~^^^^^^^^^
File "/opt/macports-bin-pkg-version/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/barman/wal_archiver.py", line 189, in archive
self.archive_wal(compressor, encryption, wal_info)
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/macports-bin-pkg-version/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/barman/wal_archiver.py", line 294, in archive_wal
dst_info = self.backup_manager.get_wal_file_info(dst_file)
File "/opt/macports-bin-pkg-version/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/barman/backup.py", line 1931, in get_wal_file_info
return WalFileInfo.from_file(
~~~~~~~~~~~~~~~~~~~~~^
filename,
^^^^^^^^^
...<2 lines>...
encryption_manager=self.encryption_manager,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/opt/macports-bin-pkg-version/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/barman/infofile.py", line 416, in from_file
kwargs["encryption"] = encryption_manager.identify_encryption(filename)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
File "/opt/macports-bin-pkg-version/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/barman/encryption.py", line 319, in identify_encryption
if klass.recognize_encryption(filename):
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
File "/opt/macports-bin-pkg-version/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/barman/encryption.py", line 215, in recognize_encryption
process = subprocess.run(
["file", "--brief", filename],
...<3 lines>...
text=True,
)
File "/opt/macports-bin-pkg-version/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/subprocess.py", line 556, in run
stdout, stderr = process.communicate(input, timeout=timeout)
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/macports-bin-pkg-version/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/subprocess.py", line 1222, in communicate
stdout, stderr = self._communicate(input, endtime, timeout)
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/macports-bin-pkg-version/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/subprocess.py", line 2169, in _communicate
stdout = self._translate_newlines(stdout,
self.stdout.encoding,
self.stdout.errors)
File "/opt/macports-bin-pkg-version/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/subprocess.py", line 1099, in _translate_newlines
data = data.decode(encoding, errors)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xcd in position 61: invalid continuation byte