1
0
Fork 0
mirror of https://github.com/imjasonh/gcloud-help synced 2026-07-08 10:35:03 +00:00

gcloud: Wed Aug 27 10:57:46 UTC 2025

This commit is contained in:
Automated 2025-08-27 10:57:46 +00:00
parent 470b35e498
commit 93c043aaa0
176 changed files with 5452 additions and 264 deletions

View file

@ -31,6 +31,9 @@ COMMANDS
trigger-backup
Create an on-demand backup for a resource.
update
Update a specific backup plan within a backup plan association.
NOTES
This variant is also available:

View file

@ -0,0 +1,127 @@
NAME
gcloud backup-dr backup-plan-associations update - update a specific backup
plan within a backup plan association
SYNOPSIS
gcloud backup-dr backup-plan-associations update
(BACKUP_PLAN_ASSOCIATION
: --location=LOCATION --workload-project=WORKLOAD_PROJECT)
--backup-plan=BACKUP_PLAN [--async] [GCLOUD_WIDE_FLAG ...]
DESCRIPTION
Update a specific backup plan within a backup plan association.
EXAMPLES
To update backup plan association sample-bpa in project sample-project and
location us-central1 with backup plan sample-backup-plan in the same
project and location, run:
$ gcloud backup-dr backup-plan-associations update sample-bpa \
--project=sample-project --location=us-central1 \
--backup-plan=sample-backup-plan
To update backup plan association sample-bpa-uri with backup plan
sample-backup-plan-uri (using full URIs), run:
$ gcloud backup-dr backup-plan-associations update sample-bpa-uri \
--backup-plan=sample-backup-plan-uri
To update backup plan association sample-bpa in location us-central1 with
backup plan sample-backup-plan-uri, run:
$ gcloud backup-dr backup-plan-associations update sample-bpa \
--location=us-central1 --backup-plan=sample-backup-plan-uri
To update backup plan association sample-bpa in project workload-project
and location us-central1 with backup plan sample-backup-plan in project
sample-project, run:
$ gcloud backup-dr backup-plan-associations update sample-bpa \
--workload-project=workload-project --location=us-central1 \
--backup-plan=sample-backup-plan --project=sample-project
POSITIONAL ARGUMENTS
Backup Plan Association resource - Backup plan association to be updated.
To update backup plan associations in a project that's different from the
backup plan, use the --workload-project flag. The arguments in this group
can be used to specify the attributes of this resource.
This must be specified.
BACKUP_PLAN_ASSOCIATION
ID of the Backup Plan Association or fully qualified identifier for
the Backup Plan Association.
To set the name attribute:
▸ provide the argument BACKUP_PLAN_ASSOCIATION 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 Plan Association.
To set the location attribute:
▸ provide the argument BACKUP_PLAN_ASSOCIATION on the command line
with a fully specified name;
▸ provide the argument --location on the command line.
--workload-project=WORKLOAD_PROJECT
Cloud project id for the Backup Plan Association.
To set the workload-project attribute:
▸ provide the argument BACKUP_PLAN_ASSOCIATION on the command line
with a fully specified name;
▸ provide the argument --workload-project on the command line;
▸ provide the argument --project on the command line;
▸ set the property core/project.
REQUIRED FLAGS
Backup Plan resource - Name of the specific backup plan to be applied to
the backup plan association. E.g.,
projects/sample-project/locations/us-central1/backupPlans/sample-backup-plan
This represents a Cloud 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-plan on the command line with a fully
specified name;
◆ provide the argument --project on the command line;
◆ set the property core/project.
To set the location attribute:
◆ provide the argument --backup-plan on the command line with a fully
specified name;
◆ provide the argument --location on the command line.
This must be specified.
--backup-plan=BACKUP_PLAN
ID of the Backup Plan or fully qualified identifier for the Backup
Plan.
To set the name attribute:
▸ provide the argument --backup-plan on the command line.
OPTIONAL FLAGS
--async
Return immediately, without waiting for the operation in progress to
complete. The default is True. Enabled by default, use --no-async to
disable.
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.
BRIEF
Update a specific backup plan within a backup plan association.
NOTES
This variant is also available:
$ gcloud alpha backup-dr backup-plan-associations update

View file

@ -27,6 +27,9 @@ COMMANDS
list
List backup plans in the project.
update
Update a specific backup plan.
NOTES
This variant is also available:

View file

@ -0,0 +1,287 @@
NAME
gcloud backup-dr backup-plans update - update a specific backup plan
SYNOPSIS
gcloud backup-dr backup-plans update (BACKUP_PLAN : --location=LOCATION)
[--add-backup-rule=[PROPERTY=VALUE,...]] [--async]
[--backup-rule=[PROPERTY=VALUE,...]]
[--backup-rules-from-file=PATH_TO_FILE] [--description=DESCRIPTION]
[--remove-backup-rule=RULE-ID] [GCLOUD_WIDE_FLAG ...]
DESCRIPTION
Update a specific backup plan in the project. It can only be updated in
regions supported by the Backup and DR Service.
EXAMPLES
To update 2 backup rules and description of an existing backup plan
sample-backup-plan in project sample-project, at location us-central1:
run:
$ gcloud backup-dr backup-plans update sample-backup-plan \
--project=sample-project --location=us-central1 \
--backup-rule <BACKUP-RULE> --backup-rule <BACKUP-RULE> \
--description "This is a sample backup plan"
To add backup rules to an existing backup plan sample-backup-plan in
project sample-project, at location us-central1:
run:
$ gcloud backup-dr backup-plans update sample-backup-plan \
--project=sample-project --location=us-central1 \
--add-backup-rule <BACKUP-RULE> --add-backup-rule <BACKUP-RULE>
To remove a backup rule with id sample-daily-rule from an existing backup
plan sample-backup-plan in project sample-project, at location us-central1:
run:
$ gcloud backup-dr backup-plans update sample-backup-plan \
--project=sample-project --location=us-central1 \
--remove-backup-rule sample-daily-rule
To override backup rules in an existing backup plan sample-backup-plan in
project sample-project, at location us-central1, pass a file path
containing backup rules in YAML or JSON format: This flag is mutually
exclusive with --add-backup-rule, --remove-backup-rule and --backup-rule
flags.
run: $ gcloud backup-dr backup-plans update sample-backup-plan \
--project=sample-project --location=us-central1 \
--backup-rules-fom-file <FILE_PATH>
Backup Rule Examples:
1. Hourly backup rule with hourly backup frequency of 6 hours and store it
for 30 days, and expect the backups to run only between 10:00 to 20:00 UTC
<BACKUP-RULE>:
rule-id=sample-hourly-rule,retention-days=30,recurrence=HOURLY,hourly-frequency=6,time-zone=UTC,backup-window-start=10,backup-window-end=20
Properties:
▪ rule-id = "sample-hourly-rule"
▪ retention-days = 30
▪ recurrence = HOURLY
▪ hourly-frequency = 6
▪ time-zone = UTC
▪ backup-window-start = 10
▪ backup-window-end = 20
2. Daily backup rule with daily backup frequency of 6 hours and store it
for 7 days
<BACKUP-RULE>:
rule-id=sample-daily-rule,retention-days=7,recurrence=DAILY,backup-window-start=1,backup-window-end=14
Properties:
▪ rule-id = "sample-daily-rule"
▪ retention-days = 7
▪ recurrence = DAILY
▪ backup-window-start = 1
▪ backup-window-end = 14
3. Weekly backup rule with weekly backup frequency on every MONDAY & FRIDAY
and store it for 21 days
<BACKUP-RULE>:
rule-id=sample-weekly-rule,retention-days=21,recurrence=WEEKLY,days-of-week="MONDAY
FRIDAY",backup-window-start=10,backup-window-end=20
Properties:
▪ rule-id = "sample-weekly-rule"
▪ retention-days: 21
▪ recurrence = WEEKLY
▪ days-of-week = "MONDAY FRIDAY"
▪ backup-window-start = 10
▪ backup-window-end = 20
YAML and JSON file examples:
YAML file example:
backup-rules:
- rule-id: weekly-rule
retention-days: 7
recurrence: WEEKLY
backup-window-start: 0
backup-window-end: 23
days-of-week: [MONDAY, TUESDAY]
time-zone: UTC
- rule-id: daily-rule
retention-days: 1
recurrence: DAILY
backup-window-start: 1
backup-window-end: 24
time-zone: UTC
JSON file example: {
"backup-rules": [
{
"rule-id": "weekly-rule",
"retention-days": 7,
"recurrence": "WEEKLY",
"backup-window-start": 0,
"backup-window-end": 23,
"days-of-week": ["MONDAY", "TUESDAY"],
"time-zone": "UTC"
},
{
"rule-id": "daily-rule",
"retention-days": 1,
"recurrence": "DAILY",
"backup-window-start": 1,
"backup-window-end": 24,
"time-zone": "UTC"
}
]
}
POSITIONAL ARGUMENTS
Backup Plan resource - Name of the backup plan to be updated. The name
must be unique for a 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_plan 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_PLAN
ID of the Backup Plan or fully qualified identifier for the Backup
Plan.
To set the name attribute:
▸ provide the argument backup_plan 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 Plan.
To set the location attribute:
▸ provide the argument backup_plan on the command line with a fully
specified name;
▸ provide the argument --location on the command line.
FLAGS
--add-backup-rule=[PROPERTY=VALUE,...]
Parameters of backup rule to be added to the Backup Plan. This flag can
be repeated to add more backup rules.
--async
Return immediately, without waiting for the operation in progress to
complete. The default is True. Enabled by default, use --no-async to
disable.
--backup-rule=[PROPERTY=VALUE,...]
Full definition of an existing backup rule with updated values. The
existing backup rule is replaced by this new set of values. This flag
can be repeated to update multiple backup rules. It is not allowed to
pass the same rule-id in this flag more than once in the same command.
Parameters for the backup rule include:
rule-id
Name of the backup rule. The name must be unique and start with a
lowercase letter followed by up to 62 lowercase letters, numbers,
or hyphens.
retention-days
Duration for which backup data should be retained. It must be
defined in "days". The value should be greater than or equal to the
enforced retention period set for the backup vault.
recurrence
Frequency for the backup schedule. It must be either: HOURLY,
DAILY, WEEKLY, MONTHLY or YEARLY.
backup-window-start
Start time of the interval during which backup jobs should be
executed. It can be defined as backup-window-start=2, that means
backup window starts at 2 a.m. The start time and end time must
have an interval of 6 hours.
backup-window-end
End time of the interval during which backup jobs should be
executed. It can be defined as backup-window-end=14, that means
backup window ends at 2 p.m. The start time and end time must have
an interval of 6 hours.
Jobs are queued at the beginning of the window and will be marked
as SKIPPED if they do not start by the end time. Jobs that are in
progress will not be canceled at the end time.
time-zone
The time zone to be used for the backup schedule. The value must
exist in the IANA tz database (https://www.iana.org/time-zones).
The default value is UTC. E.g., Europe/Paris
Following flags are mutually exclusive:
hourly-frequency
Frequency for hourly backups. An hourly frequency of 2 means backup
jobs will run every 2 hours from start time till the end time
defined. The hourly frequency must be between 4 and 23. The value
is needed only if recurrence type is HOURLY.
days-of-week
Days of the week when the backup job should be executed. The value
is needed if recurrence type is WEEKLY. E.g., MONDAY,TUESDAY
days-of-month
Days of the month when the backup job should be executed. The value
is needed only if recurrence type is YEARLY. E.g.,"1,5,14"
months
Month for the backup schedule. The value is needed only if
recurrence type is YEARLY. E.g., JANUARY, MARCH
week-day-of-month
Recurring day of the week in the month or year when the backup job
should be executed. E.g. FIRST-SUNDAY, THIRD-MONDAY. The value can
only be provided if the recurrence type is MONTHLY or YEARLY.
Allowed values for the number of week - FIRST, SECOND, THIRD,
FOURTH, LAST. Allowed values for days of the week - MONDAY to
SUNDAY.
E.g.,
"rule-id=sample-daily-rule,recurrence=WEEKLY,backup-window-start=2,backup-window-end=14,retention-days=20,days-of-week='SUNDAY
MONDAY'"
--backup-rules-from-file=PATH_TO_FILE
Path to a YAML or JSON file containing backup rules. Use a full or
relative path to a local file containing the value of backup_rules.
--description=DESCRIPTION
Provide a description of the backup plan, such as specific use cases
and relevant details, in 2048 characters or less.
E.g., This is a backup plan that performs a daily backup at 6 p.m. and
retains data for 3 months.
--remove-backup-rule=RULE-ID
Name of an existing backup rule to be removed from the Backup Plan.
This flag can be repeated to remove more backup rules.
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.
BRIEF
Update a specific backup plan
NOTES
This variant is also available:
$ gcloud alpha backup-dr backup-plans update

View file

@ -0,0 +1,215 @@
NAME
gcloud backup-dr backups restore disk - restores a Compute Disk Backup
SYNOPSIS
gcloud backup-dr backups restore disk
(BACKUP : --backup-vault=BACKUP_VAULT
--data-source=DATA_SOURCE --location=LOCATION) --name=NAME
--target-project=TARGET_PROJECT [--access-mode=ACCESS_MODE]
[--architecture=ARCHITECTURE] [--async] [--confidential-compute]
[--description=DESCRIPTION]
[--guest-os-features=[GUEST_OS_FEATURES,...]] [--kms-key=KMS_KEY]
[--labels=[KEY=VALUE,...]] [--licenses=LICENSE,[LICENSE,...]]
[--provisioned-iops=PROVISIONED_IOPS]
[--provisioned-throughput=PROVISIONED_THROUGHPUT]
[--replica-zones=ZONE,ZONE] [--resource-policies=RESOURCE_POLICY,[...]]
[--size=SIZE] [--storage-pool=STORAGE_POOL]
[--target-region=TARGET_REGION] [--target-zone=TARGET_ZONE]
[--type=TYPE] [GCLOUD_WIDE_FLAG ...]
DESCRIPTION
Restores a Compute Disk Backup.
EXAMPLES
To restore a backup sample-backup in project sample-project and location
us-central1, with sample-data-store and sample-backup-vault, and additional
target properties, run:
$ gcloud backup-dr backups restore disk sample-backup \
--project=sample-project --location=us-central1 \
--backup-vault=sample-backup-vault \
--data-source=sample-data-source --<target-properties>
POSITIONAL ARGUMENTS
Backup resource - The backup of a resource to be restored. 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 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
ID of the Backup or fully qualified identifier for the Backup.
To set the name attribute:
▸ provide the argument backup on the command line.
This positional argument must be specified if any of the other
arguments in this group are specified.
--backup-vault=BACKUP_VAULT
The ID of the Backup Vault.
To set the backup-vault attribute:
▸ provide the argument backup on the command line with a fully
specified name;
▸ provide the argument --backup-vault on the command line.
--data-source=DATA_SOURCE
The ID of the Data Source.
To set the data-source attribute:
▸ provide the argument backup on the command line with a fully
specified name;
▸ provide the argument --data-source on the command line.
--location=LOCATION
The location of the Backup.
To set the location attribute:
▸ provide the argument backup on the command line with a fully
specified name;
▸ provide the argument --location on the command line.
REQUIRED FLAGS
--name=NAME
Name of the restored Disk.
--target-project=TARGET_PROJECT
Project where the restore should happen.
OPTIONAL FLAGS
--access-mode=ACCESS_MODE
Specifies how VMs attached to the disk can access the data on the disk.
To grant read-only access to multiple VMs attached to the disk, set
access-mode to READ_ONLY_MANY. To grant read-write access to only one
VM attached to the disk, use READ_WRITE_SINGLE. READ_WRITE_SINGLE is
used if omitted. ACCESS_MODE must be one of: READ_ONLY_MANY,
READ_WRITE_MANY, READ_WRITE_SINGLE. ACCESS_MODE must be one of:
READ_ONLY_MANY
The AccessMode means the disk can be attached to multiple instances
in RW mode.
READ_WRITE_MANY
The AccessMode means the disk can be attached to multiple instances
in RO mode.
READ_WRITE_SINGLE
The default AccessMode, means the disk can be attached to single
instance in RW mode.
--architecture=ARCHITECTURE
Specifies the architecture or processor type that this disk can
support. For available processor types on Compute Engine, see
https://cloud.google.com/compute/docs/cpu-platforms. ARCHITECTURE must
be one of: ARM64, X86_64. ARCHITECTURE must be one of:
ARM64
The disk can only be used with ARM64 machines.
X86_64
The disk can only be used with x86_64 machines.
--async
Return immediately, without waiting for the operation in progress to
complete. The default is True. Enabled by default, use --no-async to
disable.
--confidential-compute
Creates the disk with confidential compute mode enabled. Encryption
with a Cloud KMS key is required to enable this option.
--description=DESCRIPTION
Specifies a textual description of the restored disk.
--guest-os-features=[GUEST_OS_FEATURES,...]
Enables one or more features for VM instances that use the image for
their boot disks. See the descriptions of supported features at:
https://cloud.google.com/compute/docs/images/create-delete-deprecate-private-images#guest-os-features.
GUEST_OS_FEATURE must be one of: VIRTIO_SCSI_MULTIQUEUE, WINDOWS,
MULTI_IP_SUBNET, UEFI_COMPATIBLE, SEV_CAPABLE, SEV_LIVE_MIGRATABLE,
SEV_LIVE_MIGRATABLE_V2, SEV_SNP_CAPABLE, GVNIC, IDPF, TDX_CAPABLE,
SUSPEND_RESUME_COMPATIBLE.
--kms-key=KMS_KEY
The Cloud KMS (Key Management Service) cryptokey that will be used to
protect the disk Provide the full resource name of the cryptokey in the
format:
projects/<project>/locations/<location>/keyRings/<key-ring>/cryptoKeys/<key>
--labels=[KEY=VALUE,...]
List of label KEY=VALUE pairs to add.
Keys must start with a lowercase character and contain only hyphens
(-), underscores (), lowercase characters, and numbers. Values must
contain only hyphens (-), underscores (), lowercase characters, and
numbers.
--licenses=LICENSE,[LICENSE,...]
A list of URIs to license resources. The provided licenses will be
added onto the created disks to indicate the licensing and billing
policies.
--provisioned-iops=PROVISIONED_IOPS
Provisioned IOPS of disk to create. Only for use with disks of type
pd-extreme and hyperdisk-extreme.
--provisioned-throughput=PROVISIONED_THROUGHPUT
Provisioned throughput of disk to create. The throughput unit is MB per
sec. Only for use with disks of type hyperdisk-throughput.
--replica-zones=ZONE,ZONE
A comma-separated list of exactly 2 URLs of the zones where the disk
should be replicated to. Required when restoring to a regional disk.
The zones must be in the same region as specified in the
--target-region flag. See available zones with gcloud compute zones
list.
--resource-policies=RESOURCE_POLICY,[...]
A list of resource policy names to be added to the disk. The policies
must exist in the same region as the disk.
--size=SIZE
Size of the disk in GB. Disk size must be a multiple of 1 GB. If disk
size is not specified, the default size of 500GB for pd-standard disks,
100GB for pd-balanced disks, 100GB for pd-ssd disks, and 1000GB for
pd-extreme disks will be used. For details about disk size limits,
refer to: https://cloud.google.com/compute/docs/disks
--storage-pool=STORAGE_POOL
Specifies the URI of the storage pool in which the disk is created.
--target-region=TARGET_REGION
Region where the target disk is restored. This flag is mutually
exclusive with --target-zone.
--target-zone=TARGET_ZONE
Zone where the target disk is restored. This flag is mutually exclusive
with --target-region.
--type=TYPE
URL of the disk type describing which disk type to use to restore the
disk. For example: projects/project/zones/zone/diskTypes/pd-ssd. To get
a list of available disk types, run gcloud compute disk-types list. The
default disk type is pd-standard.
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.
BRIEF
Restores the specified backup
NOTES
This variant is also available:
$ gcloud alpha backup-dr backups restore disk

View file

@ -18,6 +18,9 @@ COMMANDS
compute
Restores a Compute Engine VM Backup.
disk
Restores a Compute Disk Backup.
NOTES
This variant is also available: