BARMAN-CLOUD-WAL-RESTORE(1)

πŸ’– BARMAN-CLOUD-WAL-RESTORE πŸ’–

okay bestie, so this is the manual for barman-cloud-wal-restore, and it lives in the Barman corner of your man pages. buckle up, it's giving "tiny script, huge responsibilities" ✨


✨ NAME ✨

barman-cloud-wal-restore β€” Barman-cloud Commands, aka the little script that goes and fetches your WAL files from the cloud. πŸ¦‹

🌸 Synopsis 🌸

barman-cloud-wal-restore
                [ { -V | --version } ]
                [ --help ]
                [ { { -v | --verbose } | { -q | --quiet } } ]
                [ { -t | --test } ]
                [ --cloud-provider { aws-s3 | azure-blob-storage | google-cloud-storage } ]
                [ --endpoint-url ENDPOINT_URL ]
                [ --addressing-style { auto | virtual | path } ]
                [ { -P | --aws-profile } AWS_PROFILE ]
                [ --profile AWS_PROFILE ]
                [ --read-timeout READ_TIMEOUT ]
                [ --sse-customer-key SSE_CUSTOMER_KEY ]
                [ { --azure-credential | --credential } { azure-cli | managed-identity
                  | default } ]
                [ --no-partial ]
                [ { -p, --parallel } PARALLEL ]
                [ --spool-dir SPOOL_DIR ]
                SOURCE_URL SERVER_NAME WAL_NAME WAL_DEST

πŸ’… Description πŸ’…

so barman-cloud-wal-restore is literally built to be your restore_command β€” it pulls WAL files straight out of cloud storage and drops them right into a Postgres standby server, no Barman server in the middle, no detour, no drama. ✨

it's the downloader to barman-cloud-wal-archive's uploader: it grabs WAL files that were previously archived with barman-cloud-wal-archive. and if you don't want automatic download of .partial files, just call the --no-partial option. easy. πŸŽ€

Note: 🫢 .partial WAL files (the ones with a .partial suffix) can pop up in the object store when a standby server is archiving WAL segments and then gets promoted to primary. the second that promotion happens, the in-progress WAL segment hasn't finished yet, so Postgres archives it as a .partial file before switching over to a new timeline. these files are an incomplete segment and are not suitable for crash recovery on their own. πŸ’€ most of the time, downloading .partial files during WAL restore is harmless, because Postgres knows how to handle them correctly. but when you're running barman-cloud-wal-restore on a cluster that has experienced a promotion, the restore_command may retrieve a .partial file (after renaming it without the suffix) where a complete WAL is expected. πŸ™ˆ use --no-partial to suppress the download of .partial files in this scenario β€” that'll cause restore_command to signal to Postgres that the WAL is not available, which prompts it to switch to the correct timeline via a timeline history file (.history) instead. iconic behaviour, honestly. πŸ‘‘
Important: πŸ”₯ on the target Postgres node, when pg_wal and the spool directory are on the same filesystem, files are moved via renaming, which is faster than copying and deleting. this speeds up serving WAL files significantly. if the directories are on different filesystems, the process still involves copying and deleting, so there's no performance gain in that case. πŸ’…
Note: 🧚 for GCP, only authentication with the GOOGLE_APPLICATION_CREDENTIALS env is supported. to use an alternative GCP universe (e.g. S3NS/T-Systems), set the GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable to the desired universe domain. ⭐

🌈 Parameters 🌈

  • SERVER_NAME β€” name of the server that will have WALs restored. πŸ’–
  • SOURCE_URL β€” URL of the cloud source, such as a bucket in AWS S3. for example: s3://bucket/path/to/folder. πŸ¦‹
  • WAL_NAME β€” the value of the '%f' keyword (according to restore_command).
  • WAL_DEST β€” the value of the '%p' keyword (according to restore_command).

πŸŽ€ The options, bestie πŸŽ€

  • -V / --version β€” show version and exit. slay, short and sweet.
  • --help β€” show this help message and exit.
  • -v / --verbose β€” increase output verbosity (e.g., -vv is more than -v).
  • -q / --quiet β€” decrease output verbosity (e.g., -qq is less than -q).
  • -t / --test β€” test cloud connectivity and exit.
  • --cloud-provider β€” the cloud provider to use as a storage backend. the allowed options are:
    • aws-s3.
    • azure-blob-storage.
    • google-cloud-storage.
  • --no-partial β€” do not download partial WAL files. 🚫
  • -p / --parallel β€” specifies the number of WAL files to fetch in parallel. default is 0 (disabled). when set to a value greater than 1, fetches the requested WAL file along with the next N - 1 files simultaneously. the additional files are staged in a local spool directory (see --spool-dir) so that subsequent restore requests can be served immediately from local storage. main character efficiency. ⚑
  • --spool-dir β€” directory used for staging extra WALs fetched when using --parallel. default is /var/tmp/walrestore.

☁️ Extra options for the AWS cloud provider ☁️

  • --endpoint-url β€” override default S3 endpoint URL with the given one.
  • --addressing-style β€” the addressing style to use for S3 requests. this is useful when connecting to S3-compatible services that require a specific addressing style. the allowed options are:
    • auto (default): uses the addressing style determined by the underlying library.
    • virtual: uses virtual-hosted style addressing (e.g., bucket-name.s3.amazonaws.com).
    • path: uses path-style addressing (e.g., s3.amazonaws.com/bucket-name).
  • -P / --aws-profile β€” profile name (e.g. INI section in AWS credentials file).
  • --profile (deprecated) β€” profile name (e.g. INI section in AWS credentials file) β€” replaced by --aws-profile. ngl bestie, it's over, use the new one. πŸ’€
  • --read-timeout β€” the time in seconds until a timeout is raised when waiting to read from a connection (defaults to 60 seconds).
  • --sse-customer-key β€” the customer-provided encryption key (SSE-C) to use for decrypting data in S3. the value must be a file:// URI pointing to a file containing a base64-encoded 256-bit (32-byte) key (e.g. file:///etc/barman/sse-c.b64). πŸ”
Important: 😭 all backups and WAL files for a given server must be encrypted with the same SSE-C key. mixing SSE-C-encrypted and unencrypted objects, or using different keys across backups, will cause barman commands to fail when S3 rejects requests with a mismatched or missing key. do not play with this one, fr fr.

πŸ’œ Extra options for the Azure cloud provider πŸ’œ

  • --azure-credential / --credential β€” optionally specify the type of credential to use when authenticating with Azure. if omitted then Azure Blob Storage credentials will be obtained from the environment and the default Azure authentication flow will be used for authenticating with all other Azure services. if no credentials can be found in the environment then the default Azure authentication flow will also be used for Azure Blob Storage. the allowed options are:
    • azure-cli.
    • managed-identity.
    • default.

🌟 Author 🌟

EnterpriseDB

Β© Copyright EnterpriseDB UK Limited 2011-2026


and that's the whole vibe check, bestie πŸ’– this page is version 3.20, dated Sep 29, 2026, and it's your BARMAN-CLOUD-WAL-RESTORE(1) girlie signing off. go restore those WALs. periodt. πŸ’…βœ¨

πŸ“¦ where this page comes from