OS Manuals

/usr/bin/barman-cloud-backup

Barman with CloudNative PG additions

From barman-cloudnative-pg 3.20.1-r3 (enterprise-packages), captured 2026-11-08 by running barman-cloud-backup --help (exit 0). permalink

usage: barman-cloud-backup [-V] [--help] [-v | -q] [-t]
                           [--cloud-provider {aws-s3,azure-blob-storage,google-cloud-storage}]
                           [--endpoint-url ENDPOINT_URL] [-P AWS_PROFILE] [--profile AWS_PROFILE]
                           [--read-timeout READ_TIMEOUT] [--addressing-style {auto,virtual,path}]
                           [--azure-credential {azure-cli,managed-identity,default}]
                           [-z | -j | --snappy | --lz4 | --zstd] [-h HOST] [-p PORT] [-U USER]
                           [--immediate-checkpoint] [-J JOBS]
                           [--keepalive-interval KEEPALIVE_INTERVAL] [-S MAX_ARCHIVE_SIZE]
                           [--min-chunk-size MIN_CHUNK_SIZE] [--max-bandwidth MAX_BANDWIDTH]
                           [-d DBNAME] [-n BACKUP_NAME] [--snapshot-instance SNAPSHOT_INSTANCE]
                           [--snapshot-disk NAME] [--snapshot-zone GCP_ZONE]
                           [--snapshot-gcp-project GCP_PROJECT] [--gcp-project GCP_PROJECT]
                           [--kms-key-name KMS_KEY_NAME] [--gcp-zone GCP_ZONE]
                           [--tags [TAGS_LIST ...] | --tag TAGS_APPEND] [-e {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 {governance,compliance}]
                           [--aws-snapshot-lock-cool-off-period AWS_SNAPSHOT_LOCK_COOL_OFF_PERIOD]
                           [--aws-snapshot-lock-expiration-date AWS_SNAPSHOT_LOCK_EXPIRATION_DATE | --aws-snapshot-lock-duration AWS_SNAPSHOT_LOCK_DURATION]
                           [--encryption-scope ENCRYPTION_SCOPE]
                           [--azure-subscription-id AZURE_SUBSCRIPTION_ID]
                           [--azure-resource-group AZURE_RESOURCE_GROUP]
                           destination_url server_name

This script can be used to perform a backup of a local PostgreSQL instance and ship the resulting
tarball(s) to the Cloud. Currently AWS S3, Azure Blob Storage and Google Cloud Storage are
supported.

positional arguments:
  destination_url       URL of the cloud destination, such as a bucket in AWS S3. For example:
                        `s3://bucket/path/to/folder`.
  server_name           the name of the server as configured in Barman.

options:
  -V, --version         show program's version number and exit
  --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 {aws-s3,azure-blob-storage,google-cloud-storage}
                        The cloud provider to use as a storage backend
  -z, --gzip            gzip-compress the backup while uploading to the cloud
  -j, --bzip2           bzip2-compress the backup while uploading to the cloud
  --snappy              snappy-compress the backup while uploading to the cloud
  --lz4                 lz4-compress the backup while uploading to the cloud
  --zstd                zstd-compress the backup while uploading to the cloud
  -h HOST, --host HOST  host or Unix socket for PostgreSQL connection (default: libpq settings)
  -p PORT, --port PORT  port for PostgreSQL connection (default: libpq settings)
  -U USER, --user USER  user name for PostgreSQL connection (default: libpq settings)
  --immediate-checkpoint
                        forces the initial checkpoint to be done as quickly as possible
  -J JOBS, --jobs JOBS  number of subprocesses to upload data to cloud storage (default: 2)
  --keepalive-interval 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)
  -S MAX_ARCHIVE_SIZE, --max-archive-size MAX_ARCHIVE_SIZE
                        maximum size of an archive when uploading to cloud storage (default:
                        100GB)
  --min-chunk-size MIN_CHUNK_SIZE
                        minimum size of an individual chunk when uploading to cloud storage
                        (default: 5MB for aws-s3, 64KB for azure-blob-storage, not applicable for
                        google-cloud-storage)
  --max-bandwidth MAX_BANDWIDTH
                        the maximum amount of data to be uploaded per second when backing up to
                        either AWS S3 or Azure Blob Storage (default: no limit)
  -d DBNAME, --dbname DBNAME
                        Database name or conninfo string for Postgres connection (default:
                        postgres)
  -n BACKUP_NAME, --name BACKUP_NAME
                        a name which can be used to reference this backup in commands such as
                        barman-cloud-restore and barman-cloud-backup-delete
  --snapshot-instance SNAPSHOT_INSTANCE
                        Instance where the disks to be backed up as snapshots are attached
  --snapshot-disk NAME  Name of a disk from which snapshots should be taken
  --snapshot-zone GCP_ZONE
                        Zone of the disks from which snapshots should be taken (deprecated:
                        replaced by --gcp-zone)
  --tags [TAGS_LIST ...]
                        Tags to be added to all uploaded files in cloud storage
  --tag TAGS_APPEND     Tag to be added to all uploaded files in cloud storage

Extra options for the aws-s3 cloud provider:
  --endpoint-url ENDPOINT_URL
                        Override default S3 endpoint URL with the given one
  -P AWS_PROFILE, --aws-profile AWS_PROFILE
                        profile name (e.g. INI section in AWS credentials file)
  --profile AWS_PROFILE
                        profile name (deprecated: replaced by --aws-profile)
  --read-timeout READ_TIMEOUT
                        the time in seconds until a timeout is raised when waiting to read from a
                        connection (defaults to 60 seconds)
  --addressing-style {auto,virtual,path}
                        the addressing style to use for S3 requests. Valid values are 'auto'
                        (default), 'virtual' (virtual-hosted-style), or 'path' (path-style)
  -e {AES256,aws:kms}, --encryption {AES256,aws:kms}
                        The encryption algorithm used when storing the uploaded data in S3.
                        Allowed values: 'AES256'|'aws:kms'.
  --sse-kms-key-id 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/--encryption` is set to `aws:kms`.
  --sse-customer-key SSE_CUSTOMER_KEY
                        Path to a file containing the customer-provided encryption key (SSE-C) to
                        use for encrypting and decrypting data in S3, specified as a file:// URI
                        (e.g. file:///path/to/key.b64). The file must contain a base64-encoded
                        256-bit key. Cannot be used together with --encryption or --sse-kms-key-
                        id.
  --aws-region AWS_REGION
                        The name of the AWS region containing the EC2 VM and storage volumes
                        defined by the --snapshot-instance and --snapshot-disk arguments.
  --aws-await-snapshots-timeout AWS_AWAIT_SNAPSHOTS_TIMEOUT
                        The length of time in seconds to wait for snapshots to be created in AWS
                        before timing out (default: 3600 seconds)
  --aws-snapshot-lock-mode {governance,compliance}
                        The lock mode to apply to the snapshot. Allowed values:
                        'governance'|'compliance'.
  --aws-snapshot-lock-cool-off-period AWS_SNAPSHOT_LOCK_COOL_OFF_PERIOD
                        Specifies the cool-off period (in hours) for a snapshot locked in
                        'compliance' mode, allowing you to unlock or modify lock settings after it
                        is locked. Range must be from 1 to 72. To lock the snapshot immediately
                        without a cool-off period, leave this option unset.
  --aws-snapshot-lock-expiration-date AWS_SNAPSHOT_LOCK_EXPIRATION_DATE
                        The expiration date for a locked snapshot in the format YYYY-MM-
                        DDThh:mm:ss.sssZ. To lock a snapshot, you must specify either this
                        argument or --aws-snapshot-lock-duration, but not both.
  --aws-snapshot-lock-duration AWS_SNAPSHOT_LOCK_DURATION
                        The duration (in days) for which the snapshot should be locked. Range must
                        be from 1 to 36500. To lock a snapshopt, you must specify either this
                        argument or --aws-snapshot-lock-expiration-date, but not both.

Extra options for the azure-blob-storage cloud provider:
  --azure-credential {azure-cli,managed-identity,default}, --credential {azure-cli,managed-identity,default}, --default {azure-cli,managed-identity,default}
                        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.
  --encryption-scope ENCRYPTION_SCOPE
                        The name of an encryption scope defined in the Azure Blob Storage service
                        which is to be used to encrypt the data in Azure
  --azure-subscription-id AZURE_SUBSCRIPTION_ID
                        The ID of the Azure subscription which owns the instance and storage
                        volumes defined by the --snapshot-instance and --snapshot-disk arguments.
  --azure-resource-group 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 google-cloud-storage cloud provider:
  --snapshot-gcp-project GCP_PROJECT
                        GCP project under which disk snapshots should be stored (deprecated:
                        replaced by --gcp-project)
  --gcp-project GCP_PROJECT
                        GCP project under which disk snapshots should be stored
  --kms-key-name KMS_KEY_NAME
                        The name of the GCP KMS key which should be used for encrypting the
                        uploaded data in GCS.
  --gcp-zone GCP_ZONE   Zone of the disks from which snapshots should be taken
Options (42)
OptionDescriptionSource
-V, --versionshow program's version number and exithelp
--helpshow this help message and exithelp
-v, --verboseincrease output verbosity (e.g., -vv is more than -v)help
-q, --quietdecrease output verbosity (e.g., -qq is less than -q)help
-t, --testTest cloud connectivity and exithelp
--cloud-provider aws-s3The cloud provider to use as a storage backendhelp
-z, --gzipgzip-compress the backup while uploading to the cloudhelp
-j, --bzip2bzip2-compress the backup while uploading to the cloudhelp
--snappysnappy-compress the backup while uploading to the cloudhelp
--lz4lz4-compress the backup while uploading to the cloudhelp
--zstdzstd-compress the backup while uploading to the cloudhelp
-h, --host HOSThost or Unix socket for PostgreSQL connection (default: libpq settings)help
-p, --port PORTport for PostgreSQL connection (default: libpq settings)help
-U, --user USERuser name for PostgreSQL connection (default: libpq settings)help
--immediate-checkpointforces the initial checkpoint to be done as quickly as possiblehelp
-J, --jobs JOBSnumber of subprocesses to upload data to cloud storage (default: 2)help
--keepalive-interval KEEPALIVE_INTERVALan 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)help
--min-chunk-size MIN_CHUNK_SIZEminimum size of an individual chunk when uploading to cloud storage (default: 5MB for aws-s3, 64KB for azure-blob-storage, not applicable for google-cloud-storage)help
--max-bandwidth MAX_BANDWIDTHthe maximum amount of data to be uploaded per second when backing up to either AWS S3 or Azure Blob Storage (default: no limit)help
--snapshot-instance SNAPSHOT_INSTANCEInstance where the disks to be backed up as snapshots are attachedhelp
--snapshot-disk NAMEName of a disk from which snapshots should be takenhelp
--snapshot-zone GCP_ZONEZone of the disks from which snapshots should be taken (deprecated: replaced by --gcp-zone)help
--tag TAGS_APPENDTag to be added to all uploaded files in cloud storagehelp
--endpoint-url ENDPOINT_URLOverride default S3 endpoint URL with the given onehelp
--profile AWS_PROFILEprofile name (deprecated: replaced by --aws-profile)help
--read-timeout READ_TIMEOUTthe time in seconds until a timeout is raised when waiting to read from a connection (defaults to 60 seconds)help
--addressing-style autothe addressing style to use for S3 requests.help
--sse-kms-key-id SSE_KMS_KEY_IDThe AWS KMS key ID that should be used for encrypting the uploaded data in S3.help
--sse-customer-key SSE_CUSTOMER_KEYPath to a file containing the customer-provided encryption key (SSE-C) to use for encrypting and decrypting data in S3, specified as a file:// URI (e.g. file:///path/to/key.b64).help
--aws-region AWS_REGIONThe name of the AWS region containing the EC2 VM and storage volumes defined by the --snapshot-instance and --snapshot-disk arguments.help
--aws-await-snapshots-timeout AWS_AWAIT_SNAPSHOTS_TIMEOUTThe length of time in seconds to wait for snapshots to be created in AWS before timing out (default: 3600 seconds)help
--aws-snapshot-lock-mode governanceThe lock mode to apply to the snapshot.help
--aws-snapshot-lock-cool-off-period AWS_SNAPSHOT_LOCK_COOL_OFF_PERIODSpecifies the cool-off period (in hours) for a snapshot locked in 'compliance' mode, allowing you to unlock or modify lock settings after it is locked.help
--aws-snapshot-lock-expiration-date AWS_SNAPSHOT_LOCK_EXPIRATION_DATEThe expiration date for a locked snapshot in the format YYYY-MM- DDThh:mm:ss.sssZ.help
--aws-snapshot-lock-duration AWS_SNAPSHOT_LOCK_DURATIONThe duration (in days) for which the snapshot should be locked.help
--encryption-scope ENCRYPTION_SCOPEThe name of an encryption scope defined in the Azure Blob Storage service which is to be used to encrypt the data in Azurehelp
--azure-subscription-id AZURE_SUBSCRIPTION_IDThe ID of the Azure subscription which owns the instance and storage volumes defined by the --snapshot-instance and --snapshot-disk arguments.help
--azure-resource-group AZURE_RESOURCE_GROUPThe name of the Azure resource group to which the compute instance and disks defined by the --snapshot-instance and --snapshot-disk arguments belong.help
--snapshot-gcp-project GCP_PROJECTGCP project under which disk snapshots should be stored (deprecated: replaced by --gcp-project)help
--gcp-project GCP_PROJECTGCP project under which disk snapshots should be storedhelp
--kms-key-name KMS_KEY_NAMEThe name of the GCP KMS key which should be used for encrypting the uploaded data in GCS.help
--gcp-zone GCP_ZONEZone of the disks from which snapshots should be takenhelp

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.