File: //snap/google-cloud-cli/394/help/man/man1/gcloud_alpha_spanner_backups_create.1
.TH "GCLOUD_ALPHA_SPANNER_BACKUPS_CREATE" 1
.SH "NAME"
.HP
gcloud alpha spanner backups create \- creates a backup of a Cloud Spanner database
.SH "SYNOPSIS"
.HP
\f5gcloud alpha spanner backups create\fR (\fIBACKUP\fR\ :\ \fB\-\-instance\fR=\fIINSTANCE\fR) \fB\-\-database\fR=\fIDATABASE\fR (\fB\-\-expiration\-date\fR=\fIEXPIRATION_DATE\fR\ |\ \fB\-\-retention\-period\fR=\fIRETENTION_PERIOD\fR) [\fB\-\-async\fR] [\fB\-\-version\-time\fR=\fITIMESTAMP\fR] [\fB\-\-encryption\-type\fR=\fIENCRYPTION_TYPE\fR\ \fB\-\-kms\-keys\fR=[\fIKMS_KEYS\fR,...]\ |\ [\fB\-\-kms\-key\fR=\fIKMS_KEY\fR\ :\ \fB\-\-kms\-keyring\fR=\fIKMS_KEYRING\fR\ \fB\-\-kms\-location\fR=\fIKMS_LOCATION\fR\ \fB\-\-kms\-project\fR=\fIKMS_PROJECT\fR]] [\fIGCLOUD_WIDE_FLAG\ ...\fR]
.SH "DESCRIPTION"
\fB(ALPHA)\fR Creates a backup of a Cloud Spanner database.
.SH "EXAMPLES"
To create a backup asynchronously, run:
.RS 2m
$ gcloud alpha spanner backups create BACKUP_ID \e
\-\-instance=INSTANCE_NAME \-\-database=DATABASE \e
\-\-expiration\-date=2020\-03\-29T10:49:41Z \-\-async
.RE
To create a backup synchronously, run:
.RS 2m
$ gcloud alpha spanner backups create BACKUP_ID \e
\-\-instance=INSTANCE_NAME \-\-database=DATABASE \e
\-\-retention\-period=2w
.RE
.SH "POSITIONAL ARGUMENTS"
.RS 2m
.TP 2m
Backup resource \- The Cloud Spanner backup 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 \f5project\fR attribute:
.RS 2m
.IP "\(em" 2m
provide the argument \f5backup\fR on the command line with a fully specified
name;
.IP "\(em" 2m
provide the argument \f5\-\-project\fR on the command line;
.IP "\(em" 2m
set the property \f5core/project\fR.
.RE
.sp
This must be specified.
.RS 2m
.TP 2m
\fIBACKUP\fR
ID of the backup or fully qualified identifier for the backup.
To set the \f5backup\fR attribute:
.RS 2m
.IP "\(bu" 2m
provide the argument \f5backup\fR on the command line.
.RE
.sp
This positional argument must be specified if any of the other arguments in this
group are specified.
.TP 2m
\fB\-\-instance\fR=\fIINSTANCE\fR
The Cloud Spanner instance for the backup.
To set the \f5instance\fR attribute:
.RS 2m
.IP "\(bu" 2m
provide the argument \f5backup\fR on the command line with a fully specified
name;
.IP "\(bu" 2m
provide the argument \f5\-\-instance\fR on the command line;
.IP "\(bu" 2m
set the property \f5spanner/instance\fR.
.RE
.sp
.RE
.RE
.sp
.SH "REQUIRED FLAGS"
.RS 2m
.TP 2m
\fB\-\-database\fR=\fIDATABASE\fR
ID of the database from which the backup will be created.
.TP 2m
Exactly one of these must be specified:
.RS 2m
.TP 2m
\fB\-\-expiration\-date\fR=\fIEXPIRATION_DATE\fR
Expiration time of the backup, must be at least 6 hours and at most 30 days from
the time the request is received. See \f5$ gcloud topic datetimes\fR for
information on date/time formats.
.TP 2m
\fB\-\-retention\-period\fR=\fIRETENTION_PERIOD\fR
Retention period of the backup relative from now, must be at least 6 hours and
at most 30 days. See \f5$ gcloud topic datetimes\fR for information on duration
formats.
.RE
.RE
.sp
.SH "OPTIONAL FLAGS"
.RS 2m
.TP 2m
\fB\-\-async\fR
Return immediately, without waiting for the operation in progress to complete.
.TP 2m
\fB\-\-version\-time\fR=\fITIMESTAMP\fR
The backup will contain an externally consistent copy of the database at the
timestamp specified by \f5\-\-version\-time\fR. If \f5\-\-version\-time\fR is
not specified, the system will use the creation time of the backup.
.TP 2m
\fB\-\-encryption\-type\fR=\fIENCRYPTION_TYPE\fR
The encryption type of the backup. \fIENCRYPTION_TYPE\fR must be one of:
.RS 2m
.TP 2m
\fBcustomer\-managed\-encryption\fR
Use the provided Cloud KMS key for encryption.If this option is selected,
kms\-key must be set.
.TP 2m
\fBgoogle\-default\-encryption\fR
Use Google default encryption.
.TP 2m
\fBuse\-database\-encryption\fR
Use the same encryption configuration as the database.
.RE
.sp
.TP 2m
KMS key name group
At most one of these can be specified:
.RS 2m
.TP 2m
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 \f5kms\-project\fR attribute:
.RS 2m
.IP "\(bu" 2m
provide the argument \f5\-\-kms\-keys\fR on the command line with a fully
specified name.
.RE
.sp
To set the \f5kms\-location\fR attribute:
.RS 2m
.IP "\(bu" 2m
provide the argument \f5\-\-kms\-keys\fR on the command line with a fully
specified name.
.RE
.sp
To set the \f5kms\-keyring\fR attribute:
.RS 2m
.IP "\(bu" 2m
provide the argument \f5\-\-kms\-keys\fR on the command line with a fully
specified name.
.RE
.sp
.RS 2m
.TP 2m
\fB\-\-kms\-keys\fR=[\fIKMS_KEYS\fR,...]
IDs of the keys or fully qualified identifiers for the keys.
To set the \f5kms\-key\fR attribute:
.RS 2m
.IP "\(em" 2m
provide the argument \f5\-\-kms\-keys\fR on the command line.
.RE
.sp
.RE
.sp
.TP 2m
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.
.RS 2m
.TP 2m
\fB\-\-kms\-key\fR=\fIKMS_KEY\fR
ID of the key or fully qualified identifier for the key.
To set the \f5kms\-key\fR attribute:
.RS 2m
.IP "\(em" 2m
provide the argument \f5\-\-kms\-key\fR on the command line.
.RE
.sp
This flag argument must be specified if any of the other arguments in this group
are specified.
.TP 2m
\fB\-\-kms\-keyring\fR=\fIKMS_KEYRING\fR
KMS keyring id of the key.
To set the \f5kms\-keyring\fR attribute:
.RS 2m
.IP "\(em" 2m
provide the argument \f5\-\-kms\-key\fR on the command line with a fully
specified name;
.IP "\(em" 2m
provide the argument \f5\-\-kms\-keyring\fR on the command line.
.RE
.sp
.TP 2m
\fB\-\-kms\-location\fR=\fIKMS_LOCATION\fR
Cloud location for the key.
To set the \f5kms\-location\fR attribute:
.RS 2m
.IP "\(em" 2m
provide the argument \f5\-\-kms\-key\fR on the command line with a fully
specified name;
.IP "\(em" 2m
provide the argument \f5\-\-kms\-location\fR on the command line.
.RE
.sp
.TP 2m
\fB\-\-kms\-project\fR=\fIKMS_PROJECT\fR
Cloud project id for the key.
To set the \f5kms\-project\fR attribute:
.RS 2m
.IP "\(em" 2m
provide the argument \f5\-\-kms\-key\fR on the command line with a fully
specified name;
.IP "\(em" 2m
provide the argument \f5\-\-kms\-project\fR on the command line.
.RE
.sp
.RE
.RE
.RE
.sp
.SH "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 \fB$ gcloud help\fR for details.
.SH "NOTES"
This command is currently in alpha and might change without notice. If this
command fails with API permission errors despite specifying the correct project,
you might be trying to access an API with an invitation\-only early access
allowlist. These variants are also available:
.RS 2m
$ gcloud spanner backups create
.RE
.RS 2m
$ gcloud beta spanner backups create
.RE