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: π«Ά.partialWAL files (the ones with a.partialsuffix) 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.partialfile 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.partialfiles during WAL restore is harmless, because Postgres knows how to handle them correctly. but when you're runningbarman-cloud-wal-restoreon a cluster that has experienced a promotion, therestore_commandmay retrieve a.partialfile (after renaming it without the suffix) where a complete WAL is expected. π use--no-partialto suppress the download of.partialfiles in this scenario β that'll causerestore_commandto 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 theGOOGLE_APPLICATION_CREDENTIALSenv is supported. to use an alternative GCP universe (e.g. S3NS/T-Systems), set theGOOGLE_CLOUD_UNIVERSE_DOMAINenvironment 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 torestore_command).WAL_DESTβ the value of the'%p'keyword (according torestore_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.,-vvis more than-v).-q/--quietβ decrease output verbosity (e.g.,-qqis 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 is0(disabled). when set to a value greater than1, fetches the requested WAL file along with the nextN - 1files 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 to60seconds).--sse-customer-keyβ the customer-provided encryption key (SSE-C) to use for decrypting data in S3. the value must be afile://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 πΈ
Β© 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
- epel 10: barman-cli 3.20.1-1.el10_3 Β· GPL-3.0-only
- fedora 43: barman-cli 3.20.1-1.fc43 Β· GPL-3.0-only
- fedora 43: barman-cli 3.20.1-3.fc43 Β· GPL-3.0-only
- fedora 44: barman-cli 3.20.1-1.fc44 Β· GPL-3.0-only
- fedora 44: barman-cli 3.20.1-3.fc44 Β· GPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms