gcloud beta spanner backup-schedules update

NAME
gcloud beta spanner backup-schedules update - update a Cloud Spanner backup schedule
SYNOPSIS
gcloud beta spanner backup-schedules update(BACKUP_SCHEDULE :--database=DATABASE--instance=INSTANCE)(--cron=CRON--encryption-type=ENCRYPTION_TYPE--retention-duration=RETENTION_DURATION--kms-keys=[KMS_KEYS,…]    | [--kms-key=KMS_KEY :--kms-keyring=KMS_KEYRING--kms-location=KMS_LOCATION--kms-project=KMS_PROJECT])[GCLOUD_WIDE_FLAG]
DESCRIPTION
(BETA) Update a Cloud Spanner backup schedule.
EXAMPLES
To update a Cloud Spanner backup schedule, run:
gcloudbetaspannerbackup-schedulesupdatebackup-schedule-id--instance=instance-id--database=database-id--cron="0 2 * * *"--retention-duration=2w--encryption-type=GOOGLE_DEFAULT_ENCRYPTION
POSITIONAL ARGUMENTS
Backup schedule resource - The Cloud Spanner backup schedule to create. Thearguments 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 inother ways.

To set theproject attribute:

  • provide the argumentbackup_schedule on the command line with afully specified name;
  • provide the argument--project on the command line;
  • set the propertycore/project.

This must be specified.

BACKUP_SCHEDULE
ID of the backup-schedule or fully qualified identifier for the backup-schedule.

To set thebackup-schedule attribute:

  • provide the argumentbackup_schedule on the command line.

This positional argument must be specified if any of the other arguments in thisgroup are specified.

--database=DATABASE
The Cloud Spanner database for the backup-schedule.

To set thedatabase attribute:

  • provide the argumentbackup_schedule on the command line with afully specified name;
  • provide the argument--database on the command line.
--instance=INSTANCE
The Cloud Spanner instance for the backup-schedule.

To set theinstance attribute:

  • provide the argumentbackup_schedule on the command line with afully specified name;
  • provide the argument--instance on the command line;
  • set the propertyspanner/instance.
REQUIRED FLAGS
At least one of these must be specified:
--cron=CRON
Textual representation of the crontab. User can customize the backup frequencyand the backup version time using the cron expression. The version time must bein UTC timzeone. The backup will contain an externally consistent copy of thedatabase at the version time. Allowed frequencies are 12 hour, 1 day, 1 week and1 month. Examples of valid cron specifications: *0 2/12 * * * :every 12 hours at (2, 14) hours past midnight in UTC. *0 2,14 * * * : every 12 hours at (2,14) hours past midnight in UTC. *0 2 * * * : once a day at 2 past midnight in UTC. *0 2 * * 0 : oncea week every Sunday at 2 past midnight in UTC. *0 2 8 * * : oncea month on 8th day at 2 past midnight in UTC.
--encryption-type=ENCRYPTION_TYPE
The encryption type of the backup.ENCRYPTION_TYPE mustbe one of:
customer-managed-encryption
Use the provided Cloud KMS key for encryption. If this option is selected,kms-key must be set.
google-default-encryption
Use Google default encryption.
use-database-encryption
Use the same encryption configuration as the database.
--retention-duration=RETENTION_DURATION
The retention duration of a backup that must be at least 6 hours and at most 366days. The backup is eligible to be automatically deleted once the retentionperiod has elapsed.
KMS key name group

At most one of these can be specified:

Key resource - Cloud KMS key(s) to be used to create the Cloud Spanner backup.This represents a Cloud resource. (NOTE) Some attributes are not given argumentsin this group but can be set in other ways.

To set thekms-project attribute:

  • provide the argument--kms-keys on the command line with a fullyspecified name.

To set thekms-location attribute:

  • provide the argument--kms-keys on the command line with a fullyspecified name.

To set thekms-keyring attribute:

  • provide the argument--kms-keys on the command line with a fullyspecified name.
--kms-keys=[KMS_KEYS,…]
IDs of the keys or fully qualified identifiers for the keys.

To set thekms-key attribute:

  • provide the argument--kms-keys on the command line.
Key resource - Cloud KMS key to be used to create the Cloud Spanner backup. Thearguments in this group can be used to specify the attributes of this resource.
--kms-key=KMS_KEY
ID of the key or fully qualified identifier for the key.

To set thekms-key attribute:

  • provide the argument--kms-key on the command line.

This flag argument must be specified if any of the other arguments in this groupare specified.

--kms-keyring=KMS_KEYRING
KMS keyring id of the key.

To set thekms-keyring attribute:

  • provide the argument--kms-key on the command line with a fullyspecified name;
  • provide the argument--kms-keyring on the command line.
--kms-location=KMS_LOCATION
Cloud location for the key.

To set thekms-location attribute:

  • provide the argument--kms-key on the command line with a fullyspecified name;
  • provide the argument--kms-location on the command line.
--kms-project=KMS_PROJECT
Cloud project id for the key.

To set thekms-project attribute:

  • provide the argument--kms-key on the command line with a fullyspecified name;
  • provide the argument--kms-project on the command line.
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.

NOTES
This command is currently in beta and might change without notice. Thesevariants are also available:
gcloudspannerbackup-schedulesupdate
gcloudalphaspannerbackup-schedulesupdate

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-05-07 UTC.