1
0
Fork 0
mirror of https://github.com/imjasonh/gcloud-help synced 2026-07-09 19:06:53 +00:00
gcloud-help/gcloud/backup-dr/backup-vaults/create
2025-08-13 10:57:56 +00:00

131 lines
5.3 KiB
Text

NAME
gcloud backup-dr backup-vaults create - create a Backup and DR backup vault
SYNOPSIS
gcloud 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] [--description=DESCRIPTION]
[--effective-time=EFFECTIVE_TIME] [--labels=[KEY=VALUE,...]]
[GCLOUD_WIDE_FLAG ...]
DESCRIPTION
Create a Backup and DR backup vault.
EXAMPLES
To create a new backup vault BACKUP_VAULT in location MY_LOCATION with
minimum enforced-retention for backups of 1 month and 1 day, run:
$ gcloud backup-dr backup-vaults create BACKUP_VAULT \
--location=MY_LOCATION --backup-min-enforced-retention="p1m1d"
To create a new backup vault BACKUP_VAULT in location MY_LOCATION with
minimum enforced-retention for backups of 1 day and description
DESCRIPTION, run:
$ gcloud backup-dr backup-vaults create BACKUP_VAULT \
--location=MY_LOCATION --backup-min-enforced-retention="1d" \
--description=DESCRIPTION
To create a new backup vault BACKUP_VAULT in location MY_LOCATION with
minimum enforced-retention for backups of 1 day and label key1 with value
value1, run:
$ gcloud backup-dr backup-vaults create BACKUP_VAULT \
--location=MY_LOCATION --backup-min-enforced-retention="1d" \
--labels=key1=value1
To create a new backup vault BACKUP_VAULT in location MY_LOCATION with
minimum enforced-retention for backups of 1 day and effective-time
"2024-03-22", run:
$ gcloud backup-dr backup-vaults create BACKUP_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
cannot be changed after creation. It must be between 3-63 characters long
and must be unique within the project and location. The arguments in this
group can be used to specify the attributes of this resource. (NOTE) Some
attributes are not given arguments in this group but can be set in other
ways.
To set the project attribute:
◆ provide the argument backup_vault on the command line with a fully
specified name;
◆ provide the argument --project on 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 name attribute:
▸ provide the argument backup_vault on the command line.
This positional argument must be specified if any of the other
arguments in this group are specified.
--location=LOCATION
The location of the Backup Vault.
To set the location attribute:
▸ provide the argument backup_vault on the command line with a
fully specified name;
▸ provide the argument --location on the command line.
REQUIRED FLAGS
--backup-min-enforced-retention=BACKUP_MIN_ENFORCED_RETENTION
Backups will be kept for this minimum period before they can be
deleted. Once the effective time is reached, the enforced retention
period cannot be decreased or 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
restored from, the backup vault being created. This choice determines
the type of resources that can be stored. Restricting access to within
your project or organization limits the resources to those managed
through the Google Cloud console (e.g., Compute Engine VMs).
Unrestricted access is required for resources managed through the
management console (e.g., VMware Engine VMs, databases, and file
systems). ACCESS_RESTRICTION must be one of: within-project,
within-org, unrestricted, within-org-but-unrestricted-for-ba.
--no-async
Wait for the operation in progress to complete.
--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 is mutually exclusive with --unlock-backup-min-enforced-retention.
--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 help for details.
API REFERENCE
This command uses the backupdr/v1 API. The full documentation for this API
can be found at: https://cloud.google.com/backup-disaster-recovery
BRIEF
Creates a Backup and DR backup vault.
NOTES
This variant is also available:
$ gcloud alpha backup-dr backup-vaults create