NAME gcloud spanner backup-schedules create - create a Cloud Spanner backup schedule SYNOPSIS gcloud spanner backup-schedules create (BACKUP_SCHEDULE : --database=DATABASE --instance=INSTANCE) --backup-type=[BACKUP_TYPE] --cron=CRON --retention-duration=RETENTION_DURATION [--encryption-type=ENCRYPTION_TYPE --kms-keys=[KMS_KEYS,...] | [--kms-key=KMS_KEY : --kms-keyring=KMS_KEYRING --kms-location=KMS_LOCATION --kms-project=KMS_PROJECT]] [GCLOUD_WIDE_FLAG ...] DESCRIPTION Create a Cloud Spanner backup schedule. EXAMPLES To create a Cloud Spanner backup schedule, run: $ gcloud spanner backup-schedules create backup-schedule-id \ --instance=instance-id --database=database-id \ --cron="0 2 * * *" --retention-duration=2w \ --backup-type=full-backup POSITIONAL ARGUMENTS Backup schedule resource - The Cloud Spanner backup schedule to create. 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_schedule 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_SCHEDULE ID of the backup-schedule or fully qualified identifier for the backup-schedule. To set the backup-schedule attribute: ▸ provide the argument backup_schedule on the command line. This positional argument must be specified if any of the other arguments in this group are specified. --database=DATABASE The Cloud Spanner database for the backup-schedule. To set the database attribute: ▸ provide the argument backup_schedule on the command line with a fully specified name; ▸ provide the argument --database on the command line. --instance=INSTANCE The Cloud Spanner instance for the backup-schedule. To set the instance attribute: ▸ provide the argument backup_schedule on the command line with a fully specified name; ▸ provide the argument --instance on the command line; ▸ set the property spanner/instance. REQUIRED FLAGS --backup-type=[BACKUP_TYPE] Type of backups created by this schedule. Supported backup types: full-backup A full backup stores the entire contents of the database at a given version time. incremental-backup An incremental backup contains only the data that has changed since a previous backup. BACKUP_TYPE must be one of: full-backup, incremental-backup. --cron=CRON Textual representation of the crontab. User can customize the backup frequency and the backup version time using the cron expression. The version time must be in UTC timzeone. The backup will contain an externally consistent copy of the database at the version time. Allowed frequencies are 12 hour, 1 day, 1 week and 1 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 : once a week every Sunday at 2 past midnight in UTC. * 0 2 8 * * : once a month on 8th day at 2 past midnight in UTC. --retention-duration=RETENTION_DURATION The retention duration of a backup that must be at least 6 hours and at most 366 days. The backup is eligible to be automatically deleted once the retention period has elapsed. OPTIONAL FLAGS --encryption-type=ENCRYPTION_TYPE The encryption type of the backup. ENCRYPTION_TYPE must be 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. 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 arguments in this group but can be set in other ways. To set the kms-project attribute: ▸ provide the argument --kms-keys on the command line with a fully specified name. To set the kms-location attribute: ▸ provide the argument --kms-keys on the command line with a fully specified name. To set the kms-keyring attribute: ▸ provide the argument --kms-keys on the command line with a fully specified name. --kms-keys=[KMS_KEYS,...] IDs of the keys or fully qualified identifiers for the keys. To set the kms-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. The arguments 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-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 group are specified. --kms-keyring=KMS_KEYRING KMS keyring id of the key. To set the kms-keyring attribute: ▫ provide the argument --kms-key on the command line with a fully specified name; ▫ provide the argument --kms-keyring on the command line. --kms-location=KMS_LOCATION Cloud location for the key. To set the kms-location attribute: ▫ provide the argument --kms-key on the command line with a fully specified name; ▫ provide the argument --kms-location on the command line. --kms-project=KMS_PROJECT Cloud project id for the key. To set the kms-project attribute: ▫ provide the argument --kms-key on the command line with a fully specified 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 These variants are also available: $ gcloud alpha spanner backup-schedules create $ gcloud beta spanner backup-schedules create