gcloud alpha backup-dr backups update Stay organized with collections Save and categorize content based on your preferences.
- NAME
- gcloud alpha backup-dr backups update - update the specified Backup
- SYNOPSIS
gcloud alpha backup-dr backups update(BACKUP:--backup-vault=BACKUP_VAULT--data-source=DATA_SOURCE--location=LOCATION)[--async][--clear-labels|--remove-labels=KEY,[KEY,…] |--update-labels=[KEY=VALUE,…]][--enforced-retention-end-time=ENFORCED_RETENTION_END_TIME--expire-time=EXPIRE_TIME][GCLOUD_WIDE_FLAG …]
- DESCRIPTION
(ALPHA)Update the specified Backup.- EXAMPLES
- To update the enforced retention of a backup sample-backup in backup vaultsample-vault, data source sample-ds, project sample-project and locationus-central1, run:
gcloudalphabackup-drbackupsupdatesample-backup--backup-vault=sample-vault--data-source=sample-ds--project=sample-project--location=us-central1--enforced-retention-end-time="2025-02-14T01:10:20Z"To update the labels on a backup named
my-backupin thetest-bvvault andus-central1location, run:gcloudalphabackup-drbackupsupdatemy-backup--backup-vault=test-bv--location=us-central1--update-labels=env=prod,team=storageTo remove the
envlabel from the same backup, run:gcloudalphabackup-drbackupsupdatemy-backup--backup-vault=test-bv--location=us-central1--remove-labels=envTo clear all labels from the backup, run:
gcloudalphabackup-drbackupsupdatemy-backup--backup-vault=test-bv--location=us-central1--clear-labels - POSITIONAL ARGUMENTS
- Backup resource - Name of the backup to update. The arguments in this group canbe used to specify the attributes of this resource. (NOTE) Some attributes arenot given arguments in this group but can be set in other ways.
To set the
projectattribute:- provide the argument
backupon the command line with a fullyspecified name; - provide the argument
--projecton the command line; - set the property
core/project.
This must be specified.
BACKUP- ID of the Backup or fully qualified identifier for the Backup.
To set the
nameattribute:- provide the argument
backupon the command line.
This positional argument must be specified if any of the other arguments in thisgroup are specified.
- provide the argument
--backup-vault=BACKUP_VAULT- The ID of the Backup Vault.
To set the
backup-vaultattribute:- provide the argument
backupon the command line with a fullyspecified name; - provide the argument
--backup-vaulton the command line.
- provide the argument
--data-source=DATA_SOURCE- The ID of the Data Source.
To set the
data-sourceattribute:- provide the argument
backupon the command line with a fullyspecified name; - provide the argument
--data-sourceon the command line.
- provide the argument
--location=LOCATION- The location of the Backup.
To set the
locationattribute:- provide the argument
backupon the command line with a fullyspecified name; - provide the argument
--locationon the command line.
- provide the argument
- provide the argument
- Backup resource - Name of the backup to update. The arguments in this group canbe used to specify the attributes of this resource. (NOTE) Some attributes arenot given arguments in this group but can be set in other ways.
- FLAGS
--async- Return immediately, without waiting for the operation in progress to complete.The default is
True. Enabled by default, use--no-asyncto disable. - At most one of these can be specified:
--clear-labels- Remove all labels from the backup.
If the backup has no labels, this operation is a no-op.
--remove-labels=KEY,[KEY,…]- A list of label keys to remove from the backup.
If a label does not exist, it is silently ignored.
--update-labels=[KEY=VALUE,…]- A list of labels to apply to the backup.
Keys must start with a lowercase letter and contain only lowercase letters,numbers, and hyphens, and must be between 1 and 63 characters long. Values mustcontain only lowercase letters, numbers, and hyphens, and must be between 0 and63 characters long.
For example:
--update-labels=env=prod,team=storage
- Update Backup Flags
--enforced-retention-end-time=ENFORCED_RETENTION_END_TIME- Backups cannot be deleted until this time or later. This period can be extended,but not shortened. It should be specified in the format of "YYYY-MM-DD".
- For backup configured with a backup appliance, there are additionalrestrictions: 1. Enforced retention cannot be extended past the expiry time. 2.Enforced retention can only be updated for finalized backups.
--expire-time=EXPIRE_TIME- The date when this backup is automatically expired. This date can be extended,but not shortened. It should be specified in the format of "YYYY-MM-DD".
- GCLOUD WIDE FLAGS
- These flags are available to all commands:
--access-token-file,--account,--billing-project,--configuration,--flags-file,--flatten,--format,--help,--impersonate-service-account,--log-http,--project,--quiet,--trace-token,--user-output-enabled,--verbosity.Run
$gcloud helpfor details. - BRIEF
- Updates a specific backup
- NOTES
- This command is currently in alpha and might change without notice. If thiscommand fails with API permission errors despite specifying the correct project,you might be trying to access an API with an invitation-only early accessallowlist. This variant is also available:
gcloudbackup-drbackupsupdate
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-01-21 UTC.