gcloud beta spanner backup-schedules update Stay organized with collections Save and categorize content based on your preferences.
- 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 the
projectattribute:- provide the argument
backup_scheduleon the command line with afully specified name; - provide the argument
--projecton the command line; - set the property
core/project.
This must be specified.
BACKUP_SCHEDULE- ID of the backup-schedule or fully qualified identifier for the backup-schedule.
To set the
backup-scheduleattribute:- provide the argument
backup_scheduleon the command line.
This positional argument must be specified if any of the other arguments in thisgroup are specified.
- provide the argument
--database=DATABASE- The Cloud Spanner database for the backup-schedule.
To set the
databaseattribute:- provide the argument
backup_scheduleon the command line with afully specified name; - provide the argument
--databaseon the command line.
- provide the argument
--instance=INSTANCE- The Cloud Spanner instance for the backup-schedule.
To set the
instanceattribute:- provide the argument
backup_scheduleon the command line with afully specified name; - provide the argument
--instanceon the command line; - set the property
spanner/instance.
- provide the argument
- provide the argument
- 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.
- 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_TYPEmustbe 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 the
kms-projectattribute:- provide the argument
--kms-keyson the command line with a fullyspecified name.
To set the
kms-locationattribute:- provide the argument
--kms-keyson the command line with a fullyspecified name.
To set the
kms-keyringattribute:- provide the argument
--kms-keyson the command line with a fullyspecified name.
--kms-keys=[KMS_KEYS,…]- IDs of the keys or fully qualified identifiers for the keys.
To set the
kms-keyattribute:- provide the argument
--kms-keyson the command line.
- provide the argument
- provide the argument
- 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 the
kms-keyattribute:- provide the argument
--kms-keyon the command line.
This flag argument must be specified if any of the other arguments in this groupare specified.
- provide the argument
--kms-keyring=KMS_KEYRING- KMS keyring id of the key.
To set the
kms-keyringattribute:- provide the argument
--kms-keyon the command line with a fullyspecified name; - provide the argument
--kms-keyringon the command line.
- provide the argument
--kms-location=KMS_LOCATION- Cloud location for the key.
To set the
kms-locationattribute:- provide the argument
--kms-keyon the command line with a fullyspecified name; - provide the argument
--kms-locationon the command line.
- provide the argument
--kms-project=KMS_PROJECT- Cloud project id for the key.
To set the
kms-projectattribute:- provide the argument
--kms-keyon the command line with a fullyspecified name; - provide the argument
--kms-projecton the command line.
- provide the argument
- 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.
- At least one of these must be specified:
- 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. - NOTES
- This command is currently in beta and might change without notice. Thesevariants are also available:
gcloudspannerbackup-schedulesupdategcloudalphaspannerbackup-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.