HEX
Server: Apache/2.4.65 (Ubuntu)
System: Linux ielts-store-v2 6.8.0-1036-gcp #38~22.04.1-Ubuntu SMP Thu Aug 14 01:19:18 UTC 2025 x86_64
User: root (0)
PHP: 7.2.34-54+ubuntu20.04.1+deb.sury.org+1
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
Upload Files
File: //snap/google-cloud-cli/396/help/man/man1/gcloud_alpha_spanner_backups_copy.1
.TH "GCLOUD_ALPHA_SPANNER_BACKUPS_COPY" 1



.SH "NAME"
.HP
gcloud alpha spanner backups copy \- copies a backup of a Cloud Spanner database



.SH "SYNOPSIS"
.HP
\f5gcloud alpha spanner backups copy\fR (\fB\-\-destination\-backup\fR=\fIDESTINATION_BACKUP\fR\ :\ \fB\-\-destination\-instance\fR=\fIDESTINATION_INSTANCE\fR) (\fB\-\-expiration\-date\fR=\fIEXPIRATION_DATE\fR\ |\ \fB\-\-retention\-period\fR=\fIRETENTION_PERIOD\fR) (\fB\-\-source\-backup\fR=\fISOURCE_BACKUP\fR\ :\ \fB\-\-source\-instance\fR=\fISOURCE_INSTANCE\fR) [\fB\-\-async\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 Copies a backup of a Cloud Spanner database.



.SH "EXAMPLES"

To copy a backup within the same project, run:

.RS 2m
$ gcloud alpha spanner backups copy \e
    \-\-source\-instance=SOURCE_INSTANCE_ID \e
    \-\-source\-backup=SOURCE_BACKUP_ID \e
    \-\-destination\-instance=DESTINATION_INSTANCE_ID \e
    \-\-destination\-backup=DESTINATION_BACKUP_ID \e
    \-\-expiration\-date=2020\-03\-29T10:49:41Z
.RE

To copy a backup to a different project, run:

.RS 2m
$ gcloud alpha spanner backups copy \e
    \-\-source\-backup=projects/SOURCE_PROJECT_ID/instances/\e
SOURCE_INSTANCE_ID/backups/SOURCE_BACKUP_ID \e
    \-\-destination\-backup=projects/DESTINATION_PROJECT_ID/instances/\e
DESTINATION_INSTANCE_ID/backups/DESTINATION_BACKUP_ID \e
    \-\-expiration\-date=2020\-03\-29T10:49:41Z
.RE



.SH "REQUIRED FLAGS"

.RS 2m
.TP 2m

Backup resource \- TEXT 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 \f5\-\-destination\-backup\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
\fB\-\-destination\-backup\fR=\fIDESTINATION_BACKUP\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 \f5\-\-destination\-backup\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\-\-destination\-instance\fR=\fIDESTINATION_INSTANCE\fR

The Cloud Spanner instance for the backup.

To set the \f5instance\fR attribute:
.RS 2m
.IP "\(bu" 2m
provide the argument \f5\-\-destination\-backup\fR on the command line with a
fully specified name;
.IP "\(bu" 2m
provide the argument \f5\-\-destination\-instance\fR on the command line;
.IP "\(bu" 2m
set the property \f5spanner/instance\fR.
.RE
.sp

.RE
.sp
.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 366 days
from the time when the source backup is created. 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 366 days from the time when the source backup is created. See \f5$
gcloud topic datetimes\fR for information on duration formats.

.RE
.sp
.TP 2m

Backup resource \- TEXT 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 \f5\-\-source\-backup\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
\fB\-\-source\-backup\fR=\fISOURCE_BACKUP\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 \f5\-\-source\-backup\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\-\-source\-instance\fR=\fISOURCE_INSTANCE\fR

The Cloud Spanner instance for the backup.

To set the \f5instance\fR attribute:
.RS 2m
.IP "\(bu" 2m
provide the argument \f5\-\-source\-backup\fR on the command line with a fully
specified name;
.IP "\(bu" 2m
provide the argument \f5\-\-source\-instance\fR on the command line;
.IP "\(bu" 2m
set the property \f5spanner/instance\fR.
.RE
.sp


.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\-\-encryption\-type\fR=\fIENCRYPTION_TYPE\fR

The encryption type of the copied 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\-config\-default\-or\-backup\-encryption\fR
Use the default encryption configuration if one exists. otherwise use the same
encryption configuration as the source backup.
.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 copy 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 copy 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 copy
.RE

.RS 2m
$ gcloud beta spanner backups copy
.RE