barman icon indicating copy to clipboard operation
barman copied to clipboard

Support for backup via xz

Open rouba002 opened this issue 2 years ago • 1 comments

Hi

I would like to see even basic support for some other archivers, namely XZ (https://tukaani.org/xz/) in WAL and maybe for the backups as well. For large amount of WALs having extra space saved would be a nice benefit.

rouba002 avatar Feb 23 '23 10:02 rouba002

Hi @rouba002 - agreed it would be a nice enhancement if Barman had native support for xz compression.

You can achieve the same result with a custom compressor by setting compression = custom and then setting custom_compression_filter, custom_decompression_filter and custom_compression_magic to appropriate values, for example:

compression = custom
custom_compression_filter = xz
custom_decompression_filter = xz -d
custom_compression_magic = 0xFD377A585A00

For backups, we would need pg_basebackup/PostgreSQL to support xz - currently gzip compression can be used with all versions of PostgreSQL, and depending on the version and how it was built, lz4 and zstd compression may also be available. Any available compression can be used by Barman however xz is not supported by any current PostgreSQL versions.

mikewallace1979 avatar Feb 24 '23 11:02 mikewallace1979