1
0
Fork 0
mirror of https://github.com/imjasonh/gcloud-help synced 2026-07-16 20:36:39 +00:00
gcloud-help/gcloud/beta/container/backup-restore/backup-plans/update

223 lines
9.2 KiB
Text
Raw Normal View History

2022-06-15 08:33:03 +00:00
NAME
gcloud beta container backup-restore backup-plans update - update a backup
plan
SYNOPSIS
gcloud beta container backup-restore backup-plans update
(BACKUP_PLAN : --location=LOCATION) [--async] [--deactivated]
[--description=DESCRIPTION] [--etag=ETAG]
[--update-labels=[KEY=VALUE,...]]
[--all-namespaces | --selected-applications=SELECTED_APPLICATIONS
2025-08-20 11:13:38 +00:00
| --selected-namespace-labels=SELECTED_NAMESPACE_LABELS
2022-06-15 08:33:03 +00:00
| --selected-namespaces=[SELECTED_NAMESPACES,...]]
[--backup-delete-lock-days=BACKUP_DELETE_LOCK_DAYS
--backup-retain-days=BACKUP_RETAIN_DAYS --locked]
[--clear-labels | --remove-labels=[KEY,...]]
[--encryption-key=ENCRYPTION_KEY
2024-05-30 09:26:18 +00:00
--include-secrets --include-volume-data --permissive-mode]
2024-05-01 09:26:55 +00:00
[--paused --cron-schedule=CRON_SCHEDULE
--exclusion-windows-file=EXCLUSION_WINDOWS_FILE
--target-rpo-minutes=TARGET_RPO_MINUTES] [GCLOUD_WIDE_FLAG ...]
2022-06-15 08:33:03 +00:00
DESCRIPTION
(BETA) Update a Backup for GKE backup plan.
EXAMPLES
To update a backup plan my-backup-plan in project my-project in location
us-central1 to add new description, run:
$ gcloud beta container backup-restore backup-plans update \
my-backup-plan --project=my-project --location=us-central1 \
--description="New description"
POSITIONAL ARGUMENTS
Backup plan resource - Name of the backup plan to update. The name may be
provided either as a relative name, e.g.
projects/<project>/locations/<location>/backupPlans/<backupPlan> or as a
single ID name (with the parent resources provided via options or through
properties), e.g. BACKUP_PLAN --project=<project> --location=<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
2023-05-04 10:43:54 +00:00
can be set in other ways.
To set the project attribute:
2022-06-15 08:33:03 +00:00
◆ provide the argument backup_plan on the command line with a fully
specified name;
2024-07-31 09:35:16 +00:00
◆ provide the argument --project on the command line;
◆ set the property core/project.
2022-06-15 08:33:03 +00:00
This must be specified.
BACKUP_PLAN
ID of the backup plan or fully qualified identifier for the backup
2023-05-04 10:43:54 +00:00
plan.
To set the backup_plan attribute:
2022-06-15 08:33:03 +00:00
▸ provide the argument backup_plan on the command line.
2022-08-10 08:48:58 +00:00
This positional argument must be specified if any of the other
arguments in this group are specified.
2022-06-15 08:33:03 +00:00
--location=LOCATION
2023-05-04 10:43:54 +00:00
Google Cloud location.
To set the location attribute:
2022-06-15 08:33:03 +00:00
▸ provide the argument backup_plan on the command line with a fully
specified name;
▸ provide the argument --location on the command line;
▸ set the property gkebackup/location.
FLAGS
--async
Return immediately, without waiting for the operation in progress to
complete.
--deactivated
If set, no further changes may be made to this backup plan and no
further backups may be created for this plan. Backup deletion is still
allowed.
--description=DESCRIPTION
Optional text description for the backup plan.
--etag=ETAG
The etag is used for optimistic concurrency control as a way to help
prevent simultaneous updates or deletes of a resource from overwriting
each other.
--update-labels=[KEY=VALUE,...]
List of label KEY=VALUE pairs to update. If a label exists, its value
is modified. Otherwise, a new label is created.
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.
At most one of these can be specified:
--all-namespaces
Scope of the backup includes resources from all namespaces. Mutually
2025-08-20 11:13:38 +00:00
exclusive with --selected-namespaces, --selected-applications and
--selected-namespace-labels.
2022-06-15 08:33:03 +00:00
--selected-applications=SELECTED_APPLICATIONS
List of ProtectedApplication instances whose resources are included
2025-08-20 11:13:38 +00:00
in the backup. Mutually exclusive with --all-namespaces,
--selected-namespaces and --selected-namespace-labels. e.g:
2022-06-15 08:33:03 +00:00
--selected-applications=namespace1/foo,namespace2/bar
2025-08-20 11:13:38 +00:00
--selected-namespace-labels=SELECTED_NAMESPACE_LABELS
List of Namespace labels whose resources are included in the backup.
Mutually exclusive with --all-namespaces, --selected-namespaces and
--selected-applications. e.g:
--selected-namespace-labels=namespacelabel1=value1,namespacelabel2=value2
2022-06-15 08:33:03 +00:00
--selected-namespaces=[SELECTED_NAMESPACES,...]
List of namespaces whose resources are included in the backup.
2025-08-20 11:13:38 +00:00
Mutually exclusive with --all-namespaces, --selected-applications and
--selected-namespace-labels. e.g: --selected-namespaces=foo,bar
2022-06-15 08:33:03 +00:00
--backup-delete-lock-days=BACKUP_DELETE_LOCK_DAYS
Number of days a backup produced via this plan cannot be deleted.
Must be less than or equal to 90 days. If 0, delete operations are
2024-08-28 09:41:07 +00:00
allowed. Updating this field does not affect existing backups. Backups
created after a successful update will inherit this new value.
2022-06-15 08:33:03 +00:00
--backup-retain-days=BACKUP_RETAIN_DAYS
Number of days after which a backup produced via this plan is
automatically deleted.
2024-04-17 09:40:58 +00:00
Must be less than or equal to 365 days. If not set (value is 0),
backups are not automatically deleted. If set, must be greater than the
2024-08-28 09:41:07 +00:00
value for backup_delete_lock_days. Updating this field does not affect
existing backups. Backups created after a successful update will
inherit this new value.
2022-06-15 08:33:03 +00:00
--locked
If set, subsequent updates are not allowed to the backup plan's
retention policy and this value cannot be changed.
At most one of these can be specified:
--clear-labels
Remove all labels. If --update-labels is also specified then
--clear-labels is applied first.
For example, to remove all labels:
$ gcloud beta container backup-restore backup-plans update \
--clear-labels
To remove all existing labels and create two new labels, foo and baz:
$ gcloud beta container backup-restore backup-plans update \
--clear-labels --update-labels foo=bar,baz=qux
--remove-labels=[KEY,...]
List of label keys to remove. If a label does not exist it is
silently ignored. If --update-labels is also specified then
--update-labels is applied first.
--encryption-key=ENCRYPTION_KEY
Encryption key used for encrypting the backup.
At this time, only the Cloud Key Management Service (Cloud KMS) is
supported. Value must be entered as a relative name, e.g.:
projects/<project>/locations/<location>/keyRings/<key-ring>/cryptoKeys/<key>.
--include-secrets
If true, secret resources are included in the backup if they fall
within the scope. If unset, the default is false.
--include-volume-data
If true, snapshots are created for PD volumes corresponding to
PersistentVolumeClaims that fall within the scope. If unset, the
default is false.
2024-05-30 09:26:18 +00:00
--permissive-mode
If true, backups won't fail when Backup for GKE detects Kubernetes
configuration that is known to cause restore failures.
2024-05-01 09:26:55 +00:00
--paused
If set, automatic backup creation is suppressed. When unset, automatic
backup creation resumes with the next scheduled create event.
--cron-schedule=CRON_SCHEDULE
Schedule on which backups will be automatically created.
Use standard cron (http://en.wikipedia.org/wiki/Cron#Overview) syntax.
For example, 10 3 * * * will automatically create a backup at 0310
every day. All times are interpreted as UTC. The minimum interval
between scheduled backups is 10 minutes.
--exclusion-windows-file=EXCLUSION_WINDOWS_FILE
If provided, defines an array of exclusion windows for RPO based
schedules from the given config file in yaml. Only used together with
--target-rpo-minutes for creation and rpo-based plans during update.
--target-rpo-minutes=TARGET_RPO_MINUTES
Schedule backups based on target RPO minutes instead of fixed cron
schedules. Cannot be used with --cron-schedule.
2022-06-15 08:33:03 +00:00
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 gkebackup/v1 API. The full documentation for this API
can be found at:
https://cloud.google.com/kubernetes-engine/docs/add-on/backup-for-gke
NOTES
This command is currently in beta and might change without notice. This
variant is also available:
$ gcloud alpha container backup-restore backup-plans update