Skip to main content
Version: 0.14.0

Compression

By default, backups and WAL files are archived uncompressed. However, the Barman Cloud Plugin supports multiple compression algorithms via barman-cloud-backup and barman-cloud-wal-archive, allowing you to optimize for space, speed, or a balance of both.

Supported Compression Algorithms​

  • bzip2
  • gzip
  • lz4
  • snappy
  • xz (WAL only)
  • zstd (WAL only)

Compression settings for base backups and WAL archives are configured independently. For implementation details, refer to the corresponding API definitions:

important

Compression impacts both performance and storage efficiency. Choose the right algorithm based on your recovery time objectives (RTO), storage capacity, and network throughput.

Compression Benchmark (on MinIO)​

CompressionBackup Time (ms)Restore Time (ms)Uncompressed Size (MB)Compressed Size (MB)Ratio
None10,9277,5533953951.0:1
bzip225,40413,886395675.9:1
gzip116,2813,077395914.3:1
snappy8,1348,3413951662.4:1

Numbers come from a 2021 Barman proof of concept (EnterpriseDB/barman#344), which predates lz4 support for base backups. lz4 is not yet benchmarked.