BARMAN-CLOUD-BACKUP(1)
π NAME π
barman-cloud-backup β Barman-cloud Commands
okay so bestie, welcome to the BARMAN-CLOUD-BACKUP(1) page, part 1 of 2, and it's giving absolute banger πβ¨
π Synopsis π
here's the whole vibe in one block, literally every flag, no notes:
barman-cloud-backup
[ { -V | --version } ]
[ --help ]
[ { { -v | --verbose } | { -q | --quiet } } ]
[ { -t | --test } ]
[ --cloud-provider { aws-s3 | azure-blob-storage | google-cloud-storage } ]
[ { { -z | --gzip } | { -j | --bzip2 } | --snappy | --lz4 | --zstd } ]
[ { -h | --host } HOST ]
[ { -p | --port } PORT ]
[ { -U | --user } USER ]
[ { -d | --dbname } DBNAME ]
[ { -n | --name } BACKUP_NAME ]
[ { -J | --jobs } JOBS ]
[ { -S | --max-archive-size } MAX_ARCHIVE_SIZE ]
[ --immediate-checkpoint ]
[ --min-chunk-size MIN_CHUNK_SIZE ]
[ --max-bandwidth MAX_BANDWIDTH ]
[ --keepalive-interval KEEPALIVE_INTERVAL ]
[ --snapshot-instance SNAPSHOT_INSTANCE ]
[ --snapshot-disk NAME [ --snapshot-disk NAME ... ] ]
[ --snapshot-zone GCP_ZONE ]
[ -snapshot-gcp-project GCP_PROJECT ]
[ --tag KEY,VALUE [ --tag KEY,VALUE ... ] ]
[ --endpoint-url ENDPOINT_URL ]
[ --addressing-style { auto | virtual | path } ]
[ { -P | --aws-profile } AWS_PROFILE ]
[ --profile AWS_PROFILE ]
[ --read-timeout READ_TIMEOUT ]
[ { -e | --encryption } { AES256 | aws:kms } ]
[ --sse-kms-key-id SSE_KMS_KEY_ID ]
[ --sse-customer-key SSE_CUSTOMER_KEY ]
[ --aws-region AWS_REGION ]
[ --aws-await-snapshots-timeout AWS_AWAIT_SNAPSHOTS_TIMEOUT ]
[ --aws-snapshot-lock-mode { compliance | governance } ]
[ --aws-snapshot-lock-duration DAYS ]
[ --aws-snapshot-lock-cool-off-period HOURS ]
[ --aws-snapshot-lock-expiration-date DATETIME ]
[ { --azure-credential | --credential } { azure-cli | managed-identity | default } ]
[ --encryption-scope ENCRYPTION_SCOPE ]
[ --azure-subscription-id AZURE_SUBSCRIPTION_ID ]
[ --azure-resource-group AZURE_RESOURCE_GROUP ]
[ --gcp-project GCP_PROJECT ]
[ --kms-key-name KMS_KEY_NAME ]
[ --gcp-zone GCP_ZONE ]
DESTINATION_URL SERVER_NAME
πΈ Description πΈ
so like, barman-cloud-backup is that girl π
β it takes a local backup of a Postgres server and yeets it straight to a supported cloud provider, bypassing the Barman server entirely. main character energy, no middleman. It can also be used as a hook script for copying Barman backups from the Barman server over to one of the supported clouds, specifically as a post_backup_retry_script. versatile queen β¨
this script needs read access to PGDATA and tablespaces, and it's typically run as the postgres user. When you're using it on a Barman server, it needs read access to the directory where Barman backups live. And if --snapshot-arguments are used and snapshots are supported by the cloud provider you picked, then the backup gets performed using snapshots of the specified disks (--snapshot-disk). The backup label and metadata also get uploaded to the cloud, because of course they do π
Note: for GCP, only authentication with theGOOGLE_APPLICATION_CREDENTIALSenv is supported. And if you wanna use an alternative GCP universe (e.g. S3NS/T-Systems), set theGOOGLE_CLOUD_UNIVERSE_DOMAINenvironment variable to the desired universe domain. iykyk π¦
Important: the cloud upload may fail if any file larger than the configured--max-archive-sizeis present in the data directory or tablespaces. BUT β Postgres files up to 1GB are always allowed, regardless of the--max-archive-sizesetting. so don't panic, it's not a free-for-all, but it's also not as strict as it sounds π«Ά
π Parameters π
the positional girlies (put these last, fr fr)
SERVER_NAMEβ name of the server to be backed up. that's the one, that's the whole vibe.DESTINATION_URLβ URL of the cloud destination, like a bucket in AWS S3. for example:s3://bucket/path/to/folder. yes, that exact shape.
π the options π
-V,--versionβ show version and exit. short and sweet.--helpβ show this help message and exit. we love a self-aware king.-v,--verboseβ increase output verbosity (e.g.,-vvis more than-v). morevs, more tea β-q,--quietβ decrease output verbosity (e.g.,-qqis less than-q). shhh, we're being mysterious π€«-t,--testβ test cloud connectivity and exit. vibe check on your bucket β¨--cloud-providerβ the cloud provider to use as a storage backend.
Allowed options:
aws-s3.azure-blob-storage.google-cloud-storage.
-z,--gzipβ gzip-compress the backup while uploading to the cloud (should not be used with python < 3.2). okay periodt, but read the parenthetical.-j,--bzip2β bzip2-compress the backup while uploading to the cloud (should not be used with python < 3.3).--snappyβ snappy-compress the backup while uploading to the cloud (requires the optionalpython-snappylibrary).--lz4β lz4-compress the backup while uploading to the cloud (requires the optionallz4Python library).--zstdβ zstd-compress the backup while uploading to the cloud (requires the optionalzstandardPython library).-h,--hostβ host or Unix socket for the Postgres connection (default: libpq settings).-p,--portβ port for the Postgres connection (default: libpq settings).-U,--userβ user name for the Postgres connection (default: libpq settings).-d,--dbnameβ database name or conninfo string for the Postgres connection (default:"postgres").-n,--nameβ a name which can be used to reference this backup in commands such asbarman-cloud-restoreandbarman-cloud-backup-delete. name your child so you can find it later π-J,--jobsβ number of subprocesses to upload data to cloud storage (default:2).-S,--max-archive-sizeβ maximum size of an archive when uploading to cloud storage (default:100GB).--immediate-checkpointβ forces the initial checkpoint to be done as quickly as possible. no waiting around, we're on go πββοΈ--min-chunk-sizeβ minimum size of an individual chunk when uploading to cloud storage (default:5MBforaws-s3,64KBforazure-blob-storage, not applicable forgoogle-cloud-storage).--max-bandwidthβ the maximum amount of data to be uploaded per second when backing up to object storages (default:0β no limit).--keepalive-intervalβ an interval, in seconds, at which a heartbeat query is sent to the PostgreSQL server to keep the connection alive during the upload phase (default:60). A value of0disables the heartbeat. keeping the connection alive, keeping the relationship alive π«Ά--snapshot-instanceβ instance where the disks to be backed up as snapshots are attached.--snapshot-diskβ name of a disk from which snapshots should be taken.--tagβ tag to be added to all uploaded files in cloud storage, and/or to snapshots created, if snapshots are used.--tagsβ tags to be added to all uploaded files in cloud storage, and/or to snapshots created, if snapshots are used.
Note: if you are using--tagsbefore positional arguments, you must insert--after it to indicate the end of optional arguments. This tells the parser to treat everything after--as positional arguments. Without the--, Barman may misinterpret positional arguments as values for the last option. so literally just add the--, bestie, it's two characters, save yourself π
Deprecated since version 3.15:--tagsis deprecated. Use--taginstead. she's retiring, let her rest π
π₯ Extra options for the AWS cloud provider π₯
--endpoint-urlβ override the 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.--read-timeoutβ the time in seconds until a timeout is raised when waiting to read from a connection (defaults to60seconds).-e,--encryptionβ the encryption algorithm used when storing the uploaded data in S3.
Allowed options:
AES256.aws:kms.
--sse-kms-key-idβ the AWS KMS key ID that should be used for encrypting the uploaded data in S3. Can be specified using the key ID on its own or using the full ARN for the key. Only allowed if-e/--encryptionis set toaws:kms.--sse-customer-keyβ the customer-provided encryption key (SSE-C) to use for encrypting and 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). Cannot be used together with--sse-kms-key-idor-e/--encryption.
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. this is the "no take-backs" rule, do not test it π
--aws-regionβ the name of the AWS region containing the EC2 VM and storage volumes defined by the--snapshot-instanceand--snapshot-diskarguments.--aws-await-snapshots-timeoutβ the length of time in seconds to wait for snapshots to be created in AWS before timing out (default:3600seconds).--aws-snapshot-lock-modeβ the lock mode for the snapshot. This is only valid if--snapshot-instanceand--snapshot-diskare set.
Allowed options:
compliance.governance.
--aws-snapshot-lock-durationβ the lock duration is the period of time (in days) for which the snapshot is to remain locked, ranging from1to36,500. Set either the lock duration or the expiration date (not both).
π and that's part 1, keep scrolling because there is literally so much more π
--aws-snapshot-lock-cool-off-periodβ okay so this one is the optional cooling-off period, and it's measured in hours π . You only get to use it when you're locking a snapshot in compliance mode, and the range is 1 to 72. That's it, that's the whole vibe.--aws-snapshot-lock-expiration-dateβ instead of a duration, you tell it when the lock ends, using an expiration date in the future. It has to be at least 1 day after the snapshot creation date and time, and the format isYYYY-MM-DDTHH:MM:SS.sssZβ yes bestie, that exact format, don't freestyle it π.
π¨ Real talk: set either the lock duration or the expiration date. Not both. Pick a lane, periodt.
π«Ά Extra options for the Azure cloud provider π«Ά
--azure-credential/--credentialβ you can optionally tell it which type of credential to use when authenticating with Azure. But if you don't? Then Azure Blob Storage credentials get pulled from the environment and the default Azure authentication flow handles authenticating with all the other Azure services. And if the environment has no credentials at all, then the default Azure authentication flow gets used for Azure Blob Storage too. It's giving "we'll figure it out" β¨
The allowed options, bestie:
azure-cli.managed-identity.default.
--encryption-scopeβ the name of an encryption scope defined in the Azure Blob Storage service, which is what gets used to encrypt your data in Azure π. Fancy.--azure-subscription-idβ the ID of the Azure subscription that owns the instance and storage volumes defined by the--snapshot-instanceand--snapshot-diskarguments. Gotta tell it whose stuff this is π--azure-resource-groupβ the name of the Azure resource group that the compute instance and disks defined by the--snapshot-instanceand--snapshot-diskarguments belong to. Same energy, different container π
π Extra options for GCP cloud provider π
--gcp-projectβ the GCP project under which disk snapshots should be stored. That's the one you want, queen π--snapshot-gcp-project(deprecated) β GCP project under which disk snapshots should be stored β but heads up, this one got replaced by--gcp-project. Still documented, still here, but it's the old thing π--kms-key-nameβ the name of the GCP KMS key that should be used for encrypting the uploaded data in GCS π. Keep your stuff cute and locked.--gcp-zoneβ zone of the disks from which snapshots should be taken. Location matters, bestie π--snapshot-zone(deprecated) β zone of the disks from which snapshots should be taken β replaced by--gcp-zone. Same deprecated-girlie situation as above, no cap.
βοΈ Author βοΈ
EnterpriseDB
Β©οΈ Copyright Β©οΈ
Β© Copyright EnterpriseDB UK Limited 2011-2026
And that's the whole page, bestie π«Άβ¨ This was version 3.20, dated Sep 29, 2026, and it's the BARMAN-CLOUD-BACKUP(1) manual page β go back up to part 1 if you skipped it, and slay your backups πππ¦
π¦ 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