BARMAN-CLOUD-RESTORE(1)

πŸ’– BARMAN-CLOUD-RESTORE β€” bestie edition πŸ’–

okay so this is barman-cloud-restore, one of the barman-cloud commands, and it's literally the moment where your backup comes home. 🏠✨


🌈 SYNOPSIS

barman-cloud-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 } ]
                [ --snapshot-recovery-instance SNAPSHOT_RECOVERY_INSTANCE ]
                [ --snapshot-recovery-zone GCP_ZONE ]
                [ --aws-region AWS_REGION ]
                [ --gcp-zone GCP_ZONE ]
                [ --azure-resource-group AZURE_RESOURCE_GROUP ]
                [ --tablespace NAME:LOCATION [ --tablespace NAME:LOCATION ... ] ]
                [ --target-lsn LSN ]
                [ --target-time TIMESTAMP ]
                [ --target-tli TLI ]
                SOURCE_URL SERVER_NAME BACKUP_ID RECOVERY_DESTINATION

✨ DESCRIPTION ✨

Use this script to restore a backup directly from cloud storage that was created with the barman-cloud-backup command. 🫢 And not only that β€” this script can also prepare for recovery from a snapshot backup by verifying that attached disks were cloned from the correct snapshots, and by downloading the backup label from object storage. two jobs, both iconic. πŸ‘‘

🚨 real talk, bestie: this command does not automatically prepare Postgres for recovery. You have to manually manage any PITR options, custom restore_command values, signal files, or required WAL files to make sure Postgres actually starts β€” whether you do it by hand or with external tools. no autopilot here, the vibes are on you. 😭

Note:

For GCP, only authentication with 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 β€” the name of the server that holds the backup you wanna restore. like, whose backup is this? πŸ’…
  • SOURCE_URL β€” the URL of the cloud source, such as a bucket in AWS S3. For example: s3://bucket/path/to/folder. πŸ¦‹
  • BACKUP_ID β€” the ID of the backup to be restored. You can use a shortcut instead of the backup ID. And besides that, you can use auto to have Barman automatically find the most suitable backup for the restore operation. auto is giving ✨let the algorithm decide✨.
  • RECOVERY_DESTINATION β€” the path to a directory for recovery. where it all lands. πŸ“

πŸŽ€ OPTIONS πŸŽ€

  • -V / --version β€” show version and exit. quick lil flex. πŸ™ˆ
  • --help β€” show this help message and exit.
  • -v / --verbose β€” increase output verbosity (e.g., -vv is more than -v). more tea, more info. 🍡
  • -q / --quiet β€” decrease output verbosity (e.g., -qq is less than -q). shhh. 🀫
  • -t / --test β€” test cloud connectivity and exit. vibe check the connection. πŸ”₯
  • --cloud-provider β€” the cloud provider to use as a storage backend. Allowed options are:
    • aws-s3.
    • azure-blob-storage.
    • google-cloud-storage.
  • --snapshot-recovery-instance β€” instance where the disks recovered from the snapshots are attached.
  • --tablespace β€” tablespace relocation rule.
  • --target-lsn β€” the recovery target lsn, e.g., 3/64000000.
  • --target-time β€” the recovery target timestamp with or without timezone, in the format %Y-%m-%d %H:%M:%S.
  • --target-tli β€” the recovery target timeline.

πŸ’œ 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. 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. she's retired, use the new one bestie. πŸ’€
  • --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. no key-mixing, periodt. 😀
  • --aws-region β€” the name of the AWS region containing the EC2 VM and storage volumes defined by the --snapshot-instance and --snapshot-disk arguments.

🧚 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. Allowed options are:
    • azure-cli.
    • managed-identity.
    • default.
  • --azure-resource-group β€” the name of the Azure resource group to which the compute instance and disks defined by the --snapshot-instance and --snapshot-disk arguments belong.

πŸ¦‹ EXTRA OPTIONS FOR GCP CLOUD PROVIDER πŸ¦‹

  • --gcp-zone β€” zone of the disks from which snapshots should be taken.
  • --snapshot-recovery-zone (deprecated) β€” zone containing the instance and disks for the snapshot recovery β€” replaced by --gcp-zone. another one headed to the retirement home, we love her tho. 🫢

πŸ‘‘ AUTHOR

EnterpriseDB

Β© Copyright EnterpriseDB UK Limited 2011-2026


and that's the whole page bestie!! this was version 3.20 from Sep 29, 2026 β€” go restore something iconic, ily, mwah πŸ’–βœ¨

πŸ“¦ where this page comes from