gcloud alpha backup-dr backup-vaults create Stay organized with collections Save and categorize content based on your preferences.
- NAME
- gcloud alpha backup-dr backup-vaults create - create a Backup and DR backup vault
- SYNOPSIS
gcloud alpha backup-dr backup-vaults create(BACKUP_VAULT:--location=LOCATION)--backup-min-enforced-retention=BACKUP_MIN_ENFORCED_RETENTION[--access-restriction=ACCESS_RESTRICTION; default="within-org"][--no-async][--backup-retention-inheritance=BACKUP_RETENTION_INHERITANCE][--description=DESCRIPTION][--effective-time=EFFECTIVE_TIME][--kms-key=KMS_KEY][--labels=[KEY=VALUE,…]][GCLOUD_WIDE_FLAG …]
- DESCRIPTION
(ALPHA)Create a Backup and DR backup vault.- EXAMPLES
- To create a new backup vault
in locationBACKUP_VAULTwith minimumenforced-retention for backups of 1 month and 1 day, run:MY_LOCATIONgcloudalphabackup-drbackup-vaultscreateBACKUP_VAULT--location=MY_LOCATION--backup-min-enforced-retention="p1m1d"To create a new backup vault
in locationBACKUP_VAULTwith minimumenforced-retention for backups of 1 day and descriptionMY_LOCATION, run:DESCRIPTIONgcloudalphabackup-drbackup-vaultscreateBACKUP_VAULT--location=MY_LOCATION--backup-min-enforced-retention="1d"--description=DESCRIPTIONTo create a new backup vault
in locationBACKUP_VAULTwith minimumenforced-retention for backups of 1 day and label key1 with value value1, run:MY_LOCATIONgcloudalphabackup-drbackup-vaultscreateBACKUP_VAULT--location=MY_LOCATION--backup-min-enforced-retention="1d"--labels=key1=value1To create a new backup vault
in locationBACKUP_VAULTwith minimumenforced-retention for backups of 1 day and effective-time "2024-03-22", run:MY_LOCATIONgcloudalphabackup-drbackup-vaultscreateBACKUP_VAULT--location=MY_LOCATION--backup-min-enforced-retention="1d"--effective-time="2024-03-22" - POSITIONAL ARGUMENTS
- Backup Vault resource - Name of the backup vault to create. A vault name cannotbe changed after creation. It must be between 3-63 characters long and must beunique within the project and location. The arguments in this group can be usedto specify the attributes of this resource. (NOTE) Some attributes are not givenarguments in this group but can be set in other ways.
To set the
projectattribute:- provide the argument
backup_vaulton the command line with a fullyspecified name; - provide the argument
--projecton the command line; - set the property
core/project.
This must be specified.
BACKUP_VAULT- ID of the Backup Vault or fully qualified identifier for the Backup Vault.
To set the
nameattribute:- provide the argument
backup_vaulton the command line.
This positional argument must be specified if any of the other arguments in thisgroup are specified.
- provide the argument
--location=LOCATION- The location of the Backup Vault.
To set the
locationattribute:- provide the argument
backup_vaulton the command line with a fullyspecified name; - provide the argument
--locationon the command line.
- provide the argument
- provide the argument
- Backup Vault resource - Name of the backup vault to create. A vault name cannotbe changed after creation. It must be between 3-63 characters long and must beunique within the project and location. The arguments in this group can be usedto specify the attributes of this resource. (NOTE) Some attributes are not givenarguments in this group but can be set in other ways.
- REQUIRED FLAGS
--backup-min-enforced-retention=BACKUP_MIN_ENFORCED_RETENTION- Backups will be kept for this minimum period before they can be deleted. Oncethe effective time is reached, the enforced retention period cannot be decreasedor removed. The value must be specified in relative time format (e.g. p1d, p1m,p1m1d).
- OPTIONAL FLAGS
--access-restriction=ACCESS_RESTRICTION; default="within-org"- Authorize certain sources and destinations for data being sent into, or restoredfrom, the backup vault being created. This choice determines the type ofresources that can be stored. Restricting access to within your project ororganization limits the resources to those managed through the Google Cloudconsole (e.g., Compute Engine VMs). Unrestricted access is required forresources managed through the management console (e.g., VMware Engine VMs,databases, and file systems).
ACCESS_RESTRICTIONmust beone of:within-project,within-org,unrestricted,within-org-but-unrestricted-for-ba. --no-async- Wait for the operation in progress to complete.
--backup-retention-inheritance=BACKUP_RETENTION_INHERITANCE- The inheritance mode for enforced retention end time of the backup within thisbackup vault. Once set, the inheritance mode cannot be changed. Default isinherit-vault-retention. If set to inherit-vault-retention, the backup retentionperiod will be inherited from the backup vault. If set tomatch-backup-expire-time, the backup retention period will be the same as thebackup expiration time.
BACKUP_RETENTION_INHERITANCEmust be one of:inherit-vault-retention,match-backup-expire-time. --description=DESCRIPTION- Optional description for the backup vault (2048 characters or less).
--effective-time=EFFECTIVE_TIME- The time at which the enforced retention period becomes locked. This flag ismutually exclusive with --unlock-backup-min-enforced-retention.
--kms-key=KMS_KEY- The Cloud KMS key resource name to be used for encryption. Format:projects/{project}/locations/{location}/keyRings/{ring}/cryptoKeys/{key}
--labels=[KEY=VALUE,…]- Optional resource labels to represent metadata provided by the user.
- 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. - API REFERENCE
- This command uses the backupdr/v1 API. The full documentation for this API canbe found at:https://cloud.google.com/backup-disaster-recovery
- BRIEF
- Creates a Backup and DR backup vault.
- 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-drbackup-vaultscreate
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 2025-11-18 UTC.