barman-cloud-backup-delete#
Synopsis
barman-cloud-backup-delete
[ { -V | --version } ]
[ --help ]
[ { { -v | --verbose } | { -q | --quiet } } ]
[ { -t | --test } ]
[ --cloud-provider { aws-s3 | azure-blob-storage | google-cloud-storage } ]
[ --endpoint-url ENDPOINT_URL ]
[ { -r | --retention-policy } RETENTION_POLICY ]
[ { -m | --minimum-redundancy } MINIMUM_REDUNDANCY ]
[ { -b | --backup-id } BACKUP_ID]
[ --dry-run ]
[ { -P | --aws-profile } AWS_PROFILE ]
[ --profile AWS_PROFILE ]
[ --read-timeout READ_TIMEOUT ]
[ { --azure-credential | --credential } { azure-cli | managed-identity | default } ]
[--batch-size DELETE_BATCH_SIZE]
SOURCE_URL SERVER_NAME
Description
The barman-cloud-backup-delete script is used to delete one or more backups created
with the barman-cloud-backup command from cloud storage and to remove the associated
WAL files.
Backups can be specified for deletion either by their backup ID
(as obtained from barman-cloud-backup-list) or by a retention policy. Retention
policies mirror those used by the Barman server, deleting all backups that are not required to
meet the specified policy. When a backup is deleted, any unused WAL files associated with
that backup are also removed.
WALs are considered unused if:
The WALs predate the begin_wal value of the oldest remaining backup.
The WALs are not required by any archival backups stored in the cloud.
Note
For GCP, only authentication with GOOGLE_APPLICATION_CREDENTIALS env is supported.
Important
Each backup deletion involves three separate requests to the cloud provider: one for
the backup files, one for the backup.info file, and one for the associated WALs.
Deleting by retention policy may result in a high volume of delete requests if a
large number of backups are accumulated in cloud storage.
Parameters
SERVER_NAMEName of the server that holds the backup to be deleted.
SOURCE_URLURL of the cloud source, such as a bucket in AWS S3. For example:
s3://bucket/path/to/folder.-V/--versionShow version and exit.
--helpshow this help message and exit.
-v/--verboseIncrease output verbosity (e.g.,
-vvis more than-v).-q/--quietDecrease output verbosity (e.g.,
-qqis less than-q).-t/--testTest cloud connectivity and exit.
--cloud-providerThe cloud provider to use as a storage backend.
Allowed options are:
aws-s3.azure-blob-storage.google-cloud-storage.
-b/--backup-idID of the backup to be deleted. You can use a shortcut instead of the backup ID.
-m/--minimum-redundancyThe minimum number of backups that should always be available.
-r/--retention-policyIf specified, delete all backups eligible for deletion according to the supplied retention policy.
Syntax:
REDUNDANCY value | RECOVERY WINDOW OF value { DAYS | WEEKS | MONTHS }--batch-sizeThe maximum number of objects to be deleted in a single request to the cloud provider. If unset then the maximum allowed batch size for the specified cloud provider will be used (
1000for aws-s3,256for azure-blob-storage and100for google-cloud-storage).--dry-runFind the objects which need to be deleted but do not delete them.
Extra options for the AWS cloud provider
--endpoint-urlOverride default S3 endpoint URL with the given one.
-P/--aws-profileProfile name (e.g.
INIsection in AWS credentials file).--profile(deprecated)Profile name (e.g.
INIsection in AWS credentials file) - replaced by--aws-profile.--read-timeoutThe time in seconds until a timeout is raised when waiting to read from a connection (defaults to
60seconds).
Extra options for the Azure cloud provider
--azure-credential / --credentialOptionally 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.