Scroll to navigation

BARMAN-WAL-ARCHIVE(1) Barman BARMAN-WAL-ARCHIVE(1)

NAME

barman-wal-archive - Barman-cli Commands

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 ]
BARMAN_HOST SERVER_NAME WAL_PATH


DESCRIPTION

This script can be utilized in the archive_command of a Postgres server to transfer WAL files to a Barman host using the put-wal command (introduced in Barman 2.6). It establishes an SSH connection to the Barman host, enabling seamless integration of Barman within Postgres clusters for improved business continuity.

Exit Statuses are:

  • 0 for SUCCESS.
  • non-zero for FAILURE.

PARAMETERS

The server name configured in Barman for the Postgres server from which the WAL file is retrieved.
The host of the Barman server.
The value of the '%p' keyword (according to archive_command).
Display a help message and exit.
Display the program's version number and exit.
Specify the user for the SSH connection to the Barman server (defaults to barman).
Define the port used for the SSH connection to the Barman server.
gzip-compress the WAL file before sending it to the Barman server.
bzip2-compress the WAL file before sending it to the Barman server.
xz-compress the WAL file before sending it to the Barman server.
snappy-compress the WAL file before sending it to the Barman server (requires the python-snappy Python library to be installed).
zstd-compress the WAL file before sending it to the Barman server (requires the zstandard Python library to be installed).
lz4-compress the WAL file before sending it to the Barman server (requires the lz4 Python library to be installed).
A compression level to be used by the selected compression algorithm. Valid values are integers within the supported range of the chosen algorithm or one of the predefined labels: low, medium, and high. The range of each algorithm as well as what level each predefined label maps to can be found in compression_level.
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 argument WAL_PATH.
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.

NOTE:

When compression is enabled in barman-wal-archive, it takes precedence over the compression settings configured on the Barman server, if they differ.


IMPORTANT:

When compression is enabled in barman-wal-archive, it is performed on the client side, before the file is sent to Barman. Be mindful of the database server's load and the chosen compression algorithm and level, as higher compression can delay WAL shipping, causing WAL files to accumulate.


AUTHOR

EnterpriseDB

COPYRIGHT

© Copyright EnterpriseDB UK Limited 2011-2025

October 2, 2025 3.16