BARMAN-WAL-ARCHIVE(1)

✨ NAME ✨

barman-wal-archive β€” the Barman-cli commands, bestie πŸ’–


🌸 SYNOPSIS 🌸

barman-wal-archive
    [ { -h | --help } ]
    [ { -V | --version } ]
    [ { -U | --user } USER ]
    [ --port PORT ]
    [ { { -z | --gzip } | { -j | --bzip2 } | --xz | --snappy | --zstd | --lz4 } ]
    [ --compression-level COMPRESSION_LEVEL ]
    [ { -c | --config } CONFIG ]
    [ { -t | --test } ]
    [ --md5 ]
    [ { -p | --parallel } JOBS ]
    [ --prefetch-cache-dir PREFETCH_CACHE_DIR ]
    BARMAN_HOST SERVER_NAME WAL_PATH

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so picture this: you can literally drop this script into the archive_command of a Postgres server and it will ship your WAL files over to a Barman host using the put-wal command (which, fun fact, showed up in Barman 2.6 πŸ‘‘). It spins up an SSH connection to the Barman host, so Barman just slots into your Postgres clusters like it was always meant to be there, and your business continuity is thriving fr fr.

Exit statuses, since you asked:

  • 0 for SUCCESS πŸ’…
  • non-zero for FAILURE 😭

πŸŽ€ PARAMETERS πŸŽ€

  • SERVER_NAME β€” the server name that's configured in Barman for the Postgres server you're pulling the WAL file from.
  • BARMAN_HOST β€” the host of the Barman server. that's it, that's the whole vibe.
  • WAL_PATH β€” the value of the '%p' keyword (per archive_command, iykyk).
  • -h / --help β€” pops up a help message and dips out.
  • -V / --version β€” shows the program's version number and exits, periodt.
  • -U / --user β€” tells it which user to use for the SSH connection to the Barman server (defaults to barman).
  • --port β€” sets the port used for that SSH connection to the Barman server.
  • -z / --gzip β€” gzip-compresses the WAL file before it gets sent to the Barman server.
  • -j / --bzip2 β€” bzip2-compresses the WAL file before sending it over to the Barman server.
  • --xz β€” xz-compresses the WAL file before it goes to the Barman server.
  • --snappy β€” snappy-compresses the WAL file before sending it to the Barman server (heads up: this one needs the python-snappy Python library installed 🐍).
  • --zstd β€” zstd-compresses the WAL file before sending it to the Barman server (needs the zstandard Python library installed).
  • --lz4 β€” lz4-compresses the WAL file before sending it to the Barman server (needs the lz4 Python library installed).
  • --compression-level β€” the compression level that the selected compression algorithm should use. Valid values are integers inside the supported range of whichever algorithm you picked, or one of the predefined labels: low, medium, and high. The range for each algorithm, plus exactly which level each predefined label maps to, lives over at compression_level <#configuration-options-compression-level>.
  • -c / --config β€” points at the configuration file on the Barman server.
  • -t / --test β€” tests the connection and the configuration of the specified Postgres server in Barman so you know it's ready to receive WAL files. oh and btw, this option ignores the mandatory argument WAL_PATH πŸ™ˆ.
  • --md5 β€” uses MD5 instead of SHA256 as the hash algorithm for calculating the checksum of the WAL file when it's being transmitted to the Barman server. This exists to keep compatibility with older server versions, because older versions of Barman server only supported MD5.
  • -p / --parallel β€” the maximum number of WAL files to archive in parallel. Defaults to 0 (no parallelism).
  • --prefetch-cache-dir β€” the directory where cache metadata gets stored when you're using --parallel. Defaults to /tmp/barman-SERVER_NAME-COMPUTED_HASH.

🫢 Note 🫢

When compression is enabled in barman-wal-archive, it takes precedence over the compression settings configured on the Barman server, if they differ. like, it wins, no discussion πŸ’…

πŸ’€ Important πŸ’€

When compression is enabled in barman-wal-archive, it happens on the client side, before the file is even sent to Barman. So be mindful of the database server's load and of the compression algorithm and level you chose β€” because higher compression can delay WAL shipping, and then WAL files start piling up. not cute. watch it 🚨

πŸ‘‘ Author πŸ‘‘

EnterpriseDB


Β© Copyright EnterpriseDB UK Limited 2011-2026


and that's the whole page, bestie 🫢 this was barman-wal-archive version 3.20, dated Sep 29, 2026 β€” go archive those WALs, you've got this πŸ’œβœ¨

πŸ“¦ where this page comes from