BARMAN-WAL-RESTORE(1)

πŸ’… BARMAN-WAL-RESTORE πŸ’… (section 1, bestie)

okay so this is the Barman manual page for the barman-wal-restore command β€” the Barman-cli one. pull up a chair, we're doing this. 🫢


✨ NAME ✨

barman-wal-restore β€” Barman-cli Commands πŸŽ€


🌈 SYNOPSIS 🌈

barman-wal-restore
    [ { -h | --help } ]
    [ { -V | --version } ]
    [ { -U | --user } USER ]
    [ --port PORT ]
    [ { -s | --sleep } SECONDS ]
    [ { -p | --parallel } JOBS ]
    [ --spool-dir SPOOL_DIR ]
    [ { -P | --partial } ]
    [ { { -z | --gzip } | { -j | --bzip2 } | --keep-compression } ]
    [ { -c | --config } CONFIG ]
    [ { -t | --test } ]
    BARMAN_HOST SERVER_NAME WAL_NAME WAL_DEST

🌸 DESCRIPTION 🌸

This script is literally a restore_command for Postgres servers, and its whole job is grabbing WAL files through Barman's get-wal feature. πŸ¦‹ It opens up an SSH connection to the Barman host and makes it so easy to slot Barman into your Postgres clusters β€” which is giving business continuity, no cap. πŸ’–

And the exit statuses, bestie, are these:

  • 0 for SUCCESS. πŸŽ‰
  • 1 for remote get-wal command FAILURE, most likely because the WAL you asked for could not be found. 😭
  • 2 for ssh connection FAILURE. πŸ’€
  • Any other non-zero value for FAILURE.

πŸŽ€ PARAMETERS πŸŽ€

🌟 the positional besties

  • 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. πŸ’»
  • WAL_NAME β€” the value of the %f keyword (per restore_command).
  • WAL_NAME... no wait, we already did that one. πŸ™ˆ It's WAL_DEST β€” the value of the %p keyword (per restore_command).

✨ the options, one by one, all of them, yes all of them ✨

  • -h, --help β€” show a help message and dip. πŸ‘‹
  • -V, --version β€” show the program's version number and dip. πŸ”’
  • -U, --user β€” set the user for the SSH connection to the Barman server. Defaults to barman. πŸ‘‘
  • --port β€” set the port used for the SSH connection to the Barman server. πŸšͺ
  • -s, --sleep β€” pause for SECONDS after a failed get-wal request. Defaults to 0 β€” no wait at all. 😴
  • -p, --parallel β€” how many WAL files to fetch in parallel. Default is 0 (disabled). When you set it to anything greater than 1, it fetches the WAL file you asked for plus the next N - 1 files at the same time. Those extra files get staged in a local spool directory (peep --spool-dir) so later restore requests can be served immediately from local storage. so efficient, we love her. πŸ”₯
  • --spool-dir β€” the directory used for staging those extra WALs that get fetched when you're using --parallel. Default is /var/tmp/walrestore. πŸ“
  • -P, --partial β€” include partial WAL files (.partial) in the retrieval. 🧩
  • -z, --gzip β€” transfer WAL files compressed with gzip. πŸ—œοΈ
  • -j, --bzip2 β€” transfer WAL files compressed with bzip2. πŸ—œοΈ
  • --keep-compression β€” if you specify this, compressed files get transferred as-is and decompressed on arrival on the client side. πŸ“¦
  • -c, --config β€” specify the configuration file on the Barman server. βš™οΈ
  • -t, --test β€” test the connection and the configuration of the specified Postgres server in Barman, to make sure it's ready to receive WAL files. This option ignores the mandatory arguments WAL_NAME and WAL_DEST. βœ…

⚠️ Warning ⚠️

bestie, listen. -z / --gzip and -j / --bzip2 are deprecated and are going to be removed in the future. 😭 For WAL compression, please make sure to enable it directly on the Barman server via the compression configuration option. do it there, not here. fr fr. πŸ’…

πŸ’œ Author πŸ’œ

EnterpriseDB


Β© Copyright EnterpriseDB UK Limited 2011-2026


and that's the whole page, babes. 🌈 this was version 3.20, dated Sep 29, 2026 β€” shoutout to the Barman crew, mwah. πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ«ΆπŸ‘‘

πŸ“¦ where this page comes from