File: //snap/google-cloud-cli/current/help/man/man1/gcloud_backup-dr_backups_restore_compute.1
.TH "GCLOUD_BACKUP\-DR_BACKUPS_RESTORE_COMPUTE" 1
.SH "NAME"
.HP
gcloud backup\-dr backups restore compute \- restores a Compute Engine VM Backup
.SH "SYNOPSIS"
.HP
\f5gcloud backup\-dr backups restore compute\fR (\fIBACKUP\fR\ :\ \fB\-\-backup\-vault\fR=\fIBACKUP_VAULT\fR\ \fB\-\-data\-source\fR=\fIDATA_SOURCE\fR\ \fB\-\-location\fR=\fILOCATION\fR) \fB\-\-name\fR=\fINAME\fR \fB\-\-target\-project\fR=\fITARGET_PROJECT\fR \fB\-\-target\-zone\fR=\fITARGET_ZONE\fR [\fB\-\-accelerator\fR=[\fIcount\fR=\fICOUNT\fR],[\fItype\fR=\fITYPE\fR]] [\fB\-\-async\fR] [\fB\-\-[no\-]can\-ip\-forward\fR] [\fB\-\-confidential\-compute\fR] [\fB\-\-create\-disk\fR=[\fIPROPERTY\fR=\fIVALUE\fR,...]] [\fB\-\-[no\-]deletion\-protection\fR] [\fB\-\-description\fR=\fIDESCRIPTION\fR] [\fB\-\-[no\-]enable\-display\-device\fR] [\fB\-\-[no\-]enable\-uefi\-networking\fR] [\fB\-\-hostname\fR=\fIHOSTNAME\fR] [\fB\-\-instance\-kms\-key\fR=\fIINSTANCE_KMS_KEY\fR] [\fB\-\-instance\-termination\-action\fR=\fIINSTANCE_TERMINATION_ACTION\fR] [\fB\-\-key\-revocation\-action\-type\fR=\fIPOLICY\fR] [\fB\-\-labels\fR=[\fIKEY\fR=\fIVALUE\fR,...]] [\fB\-\-local\-ssd\-recovery\-timeout\fR=\fILOCAL_SSD_RECOVERY_TIMEOUT\fR] [\fB\-\-machine\-type\fR=\fIMACHINE_TYPE\fR] [\fB\-\-maintenance\-policy\fR=\fIMAINTENANCE_POLICY\fR] [\fB\-\-metadata\fR=\fIKEY\fR=\fIVALUE\fR,[\fIKEY\fR=\fIVALUE\fR,...]] [\fB\-\-min\-cpu\-platform\fR=\fIPLATFORM\fR] [\fB\-\-min\-node\-cpu\fR=\fIMIN_NODE_CPU\fR] [\fB\-\-network\-interface\fR=[\fIPROPERTY\fR=\fIVALUE\fR,...]] [\fB\-\-network\-performance\-configs\fR=[\fIPROPERTY\fR=\fIVALUE\fR,...]] [\fB\-\-[no\-]preemptible\fR] [\fB\-\-private\-ipv6\-google\-access\-type\fR=\fIPRIVATE_IPV6_GOOGLE_ACCESS_TYPE\fR] [\fB\-\-provisioning\-model\fR=\fIPROVISIONING_MODEL\fR] [\fB\-\-resource\-manager\-tags\fR=[\fIKEY\fR=\fIVALUE\fR,...]] [\fB\-\-resource\-policies\fR=\fIRESOURCE_POLICY\fR,[...]] [\fB\-\-[no\-]restart\-on\-failure\fR] [\fB\-\-service\-account\fR=\fISERVICE_ACCOUNT\fR] [\fB\-\-tags\fR=\fITAG\fR,[\fITAG\fR,...]] [\fB\-\-threads\-per\-core\fR=\fITHREADS_PER_CORE\fR] [\fB\-\-visible\-core\-count\fR=\fIVISIBLE_CORE_COUNT\fR] [\fB\-\-reservation\fR=\fIRESERVATION\fR\ \fB\-\-reservation\-affinity\fR=\fIRESERVATION_AFFINITY\fR] [\fB\-\-scopes\fR=[\fISCOPE\fR,...]\ |\ \fB\-\-no\-scopes\fR] [\fIGCLOUD_WIDE_FLAG\ ...\fR]
.SH "DESCRIPTION"
Restores a Compute Engine VM Backup.
.SH "EXAMPLES"
To restore a backup \f5sample\-backup\fR in project \f5sample\-project\fR and
location \f5us\-central1\fR, with \f5sample\-data\-store\fR and
\f5sample\-backup\-vault\fR, and additional target properties, run:
.RS 2m
$ gcloud backup\-dr backups restore compute sample\-backup \e
\-\-project=sample\-project \-\-location=us\-central1 \e
\-\-backup\-vault=sample\-backup\-vault \e
\-\-data\-source=sample\-data\-source \-\-<target\-properties>
.RE
.SH "POSITIONAL ARGUMENTS"
.RS 2m
.TP 2m
Backup resource \- The backup of a resource to be restored. 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 \f5name\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\-\-backup\-vault\fR=\fIBACKUP_VAULT\fR
The ID of the Backup Vault.
To set the \f5backup\-vault\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\-\-backup\-vault\fR on the command line.
.RE
.sp
.TP 2m
\fB\-\-data\-source\fR=\fIDATA_SOURCE\fR
The ID of the Data Source.
To set the \f5data\-source\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\-\-data\-source\fR on the command line.
.RE
.sp
.TP 2m
\fB\-\-location\fR=\fILOCATION\fR
The location of the Backup.
To set the \f5location\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\-\-location\fR on the command line.
.RE
.sp
.RE
.RE
.sp
.SH "REQUIRED FLAGS"
.RS 2m
.TP 2m
\fB\-\-name\fR=\fINAME\fR
Name of the restored Compute Instance.
.TP 2m
\fB\-\-target\-project\fR=\fITARGET_PROJECT\fR
Project where the restore should happen.
.TP 2m
\fB\-\-target\-zone\fR=\fITARGET_ZONE\fR
Zone where the target instance is restored.
.RE
.sp
.SH "OPTIONAL FLAGS"
.RS 2m
.TP 2m
\fB\-\-accelerator\fR=[\fIcount\fR=\fICOUNT\fR],[\fItype\fR=\fITYPE\fR]
Attaches accelerators (e.g. GPUs) to the instances.
.RS 2m
.TP 2m
\fBtype\fR
The specific type (e.g. nvidia\-tesla\-k80 for nVidia Tesla K80) of accelerator
to attach to the instances. Use 'gcloud compute accelerator\-types list' to
learn about all available accelerator types.
.TP 2m
\fBcount\fR
Number of accelerators to attach to each instance. The default value is 1.
.RE
.sp
.TP 2m
\fB\-\-async\fR
Return immediately, without waiting for the operation in progress to complete.
The default is \fBTrue\fR. Enabled by default, use \fB\-\-no\-async\fR to
disable.
.TP 2m
\fB\-\-[no\-]can\-ip\-forward\fR
If provided, allows the restored instances to send and receive packets with
non\-matching destination or source IP addresses. Use \fB\-\-can\-ip\-forward\fR
to enable and \fB\-\-no\-can\-ip\-forward\fR to disable.
.TP 2m
\fB\-\-confidential\-compute\fR
The restored instance boots with Confidential Computing enabled. Confidential
Computing is based on Secure Encrypted Virtualization (SEV), an AMD
virtualization feature for running confidential instances.
.TP 2m
\fB\-\-create\-disk\fR=[\fIPROPERTY\fR=\fIVALUE\fR,...]
Creates and attaches persistent disks to the instances.
\fBname\fR: Specifies the name of the disk.
\fBreplica\-zones\fR: Required for each regional disk associated with the
instance. Specify the URLs of the zones where the disk should be replicated to.
You must provide exactly two replica zones, and one zone must be the same as the
instance zone.
\fBdevice\-name\fR: Device name of the disk from the source instance.
.TP 2m
\fB\-\-[no\-]deletion\-protection\fR
Enables deletion protection for the restored instance. Use
\fB\-\-deletion\-protection\fR to enable and \fB\-\-no\-deletion\-protection\fR
to disable.
.TP 2m
\fB\-\-description\fR=\fIDESCRIPTION\fR
Specifies a textual description of the restored instance.
.TP 2m
\fB\-\-[no\-]enable\-display\-device\fR
Enable a display device on the restored VM instances. Disabled by default. Use
\fB\-\-enable\-display\-device\fR to enable and
\fB\-\-no\-enable\-display\-device\fR to disable.
.TP 2m
\fB\-\-[no\-]enable\-uefi\-networking\fR
If set to true, enables UEFI networking for the instance creation. Use
\fB\-\-enable\-uefi\-networking\fR to enable and
\fB\-\-no\-enable\-uefi\-networking\fR to disable.
.TP 2m
\fB\-\-hostname\fR=\fIHOSTNAME\fR
Specify the hostname of the restore instance to be created. The specified
hostname must be RFC1035 compliant. If hostname is not specified, the default
hostname is [INSTANCE_NAME].c.[TARGET_PROJECT_ID].internal when using the global
DNS, and [INSTANCE_NAME].[ZONE].c.[TARGET_PROJECT_ID].internal when using zonal
DNS.
.TP 2m
\fB\-\-instance\-kms\-key\fR=\fIINSTANCE_KMS_KEY\fR
The Cloud KMS (Key Management Service) cryptokey that will be used to protect
the restored instance.
Provide the full resource name of the cryptokey in the format:
\f5projects/<project>/locations/<location>/keyRings/<key\-ring>/cryptoKeys/<key>\fR
.TP 2m
\fB\-\-instance\-termination\-action\fR=\fIINSTANCE_TERMINATION_ACTION\fR
Specifies the termination action that will be taken upon VM preemption
(\-\-provisioning\-model=SPOT) or automatic instance termination
(\-\-max\-run\-duration or \-\-termination\-time).
\fIINSTANCE_TERMINATION_ACTION\fR must be one of:
.RS 2m
.TP 2m
\fBDELETE\fR
Permanently delete the VM.
.TP 2m
\fBSTOP\fR
Default only for Spot VMs. Stop the VM without preserving memory. The VM can be
restarted later.
.RE
.sp
.TP 2m
\fB\-\-key\-revocation\-action\-type\fR=\fIPOLICY\fR
Specifies the behavior of the instance when the KMS key of one of its attached
disks is revoked. The default is none. POLICY must be one of:
.RS 2m
.IP "\(em" 2m
none No operation is performed.
.IP "\(em" 2m
stop The instance is stopped when the KMS key of one of its attached disks is
revoked.
.RE
.sp
.TP 2m
\fB\-\-labels\fR=[\fIKEY\fR=\fIVALUE\fR,...]
List of label KEY=VALUE pairs to add.
Keys must start with a lowercase character and contain only hyphens (\-),
underscores (\fI), lowercase characters, and numbers. Values must contain only
hyphens (\-), underscores (\fR), lowercase characters, and numbers.
.TP 2m
\fB\-\-local\-ssd\-recovery\-timeout\fR=\fILOCAL_SSD_RECOVERY_TIMEOUT\fR
Specifies the maximum amount of time a Local SSD VM should wait while recovery
of the Local SSD state is attempted. Its value should be in between 0 and 168
hours with hour granularity and the default value being 1 hour.
.TP 2m
\fB\-\-machine\-type\fR=\fIMACHINE_TYPE\fR
Specifies the machine type used for the restored instance. To get a list of
available machine types, run 'gcloud compute machine\-types list'. If
unspecified, the default type will be based on the source instance.
This can either be the fully qualified path or the name. For example:
.RS 2m
.IP "\(em" 2m
\f5\fI\-\-machine\-type=projects/my\-project/zones/us\-central1\-a/machineTypes/n1\-standard\-1\fR\fR
.IP "\(em" 2m
\f5\fI\-\-machine\-type=n1\-standard\-1\fR\fR
.RE
.sp
.TP 2m
\fB\-\-maintenance\-policy\fR=\fIMAINTENANCE_POLICY\fR
Specifies the behavior of the VMs when their host machines undergo maintenance.
The default is MIGRATE. For more information, see
https://cloud.google.com/compute/docs/instances/host\-maintenance\-options.
\fIMAINTENANCE_POLICY\fR must be one of:
.RS 2m
.TP 2m
\fBMIGRATE\fR
The instances should be migrated to a new host. This will temporarily impact the
performance of instances during a migration event.
.TP 2m
\fBTERMINATE\fR
The instances should be terminated.
.RE
.sp
.TP 2m
\fB\-\-metadata\fR=\fIKEY\fR=\fIVALUE\fR,[\fIKEY\fR=\fIVALUE\fR,...]
Metadata to be made available to the guest operating system running on the
instances. Each metadata entry is a key/value pair separated by an equals sign.
Each metadata key must be unique and have a max of 128 bytes in length. Each
value must have a max of 256 KB in length. Multiple arguments can be passed to
this flag, e.g., \f5\fI\-\-metadata
key\-1=value\-1,key\-2=value\-2,key\-3=value\-3\fR\fR. The combined total size
for all metadata entries is 512 KB.
In images that have Compute Engine tools installed on them, such as the official
images (https://cloud.google.com/compute/docs/images), the following metadata
keys have special meanings:
.RS 2m
.TP 2m
\fBstartup\-script\fR
Specifies a script that will be executed by the instances once they start
running.
.TP 2m
\fBstartup\-script\-url\fR
Same as \f5\fIstartup\-script\fR\fR except that the script contents are pulled
from a publicly\-accessible location on the web.
For startup scripts on Windows instances, the following metadata keys have
special meanings: \f5\fIwindows\-startup\-script\-url\fR\fR,
\f5\fIwindows\-startup\-script\-cmd\fR\fR,
\f5\fIwindows\-startup\-script\-bat\fR\fR,
\f5\fIwindows\-startup\-script\-ps1\fR\fR,
\f5\fIsysprep\-specialize\-script\-url\fR\fR,
\f5\fIsysprep\-specialize\-script\-cmd\fR\fR,
\f5\fIsysprep\-specialize\-script\-bat\fR\fR, and
\f5\fIsysprep\-specialize\-script\-ps1\fR\fR. For more information, see Running
startup scripts (https://cloud.google.com/compute/docs/startupscript).
.RE
.sp
.TP 2m
\fB\-\-min\-cpu\-platform\fR=\fIPLATFORM\fR
When specified, the VM will be scheduled on host with specified CPU architecture
or a newer one. To list available CPU platforms in given zone, run:
.RS 2m
$ gcloud compute zones describe ZONE \e
\-\-format="value(availableCpuPlatforms)"
.RE
Default setting is "AUTOMATIC".
CPU platform selection is available only in selected zones.
You can find more information on\-line:
https://cloud.google.com/compute/docs/instances/specify\-min\-cpu\-platform
.TP 2m
\fB\-\-min\-node\-cpu\fR=\fIMIN_NODE_CPU\fR
Minimum number of virtual CPUs this instance will consume when running on a
sole\-tenant node.
.TP 2m
\fB\-\-network\-interface\fR=[\fIPROPERTY\fR=\fIVALUE\fR,...]
Adds a network interface to the instance. This flag can be repeated to specify
multiple network interfaces. The following keys are allowed: network, subnet,
private\-network\-ip, internal\-ipv6\-address, internal\-ipv6\-prefix\-length,
address, external\-ipv6\-address, external\-ipv6\-prefix\-length, network\-tier,
aliases, stack\-type, queue\-count, nic\-type, network\-attachment
.TP 2m
\fB\-\-network\-performance\-configs\fR=[\fIPROPERTY\fR=\fIVALUE\fR,...]
Configures network performance settings for the restored instance. If this flag
is not specified, the restored instance will be created with its source
instance's network performance configuration.
.RS 2m
.TP 2m
\fBtotal\-egress\-bandwidth\-tier\fR
Total egress bandwidth is the available outbound bandwidth from a VM, regardless
of whether the traffic is going to internal IP or external IP destinations. The
following tier values are allowed: [DEFAULT, TIER_1]
.RE
.sp
.TP 2m
\fB\-\-[no\-]preemptible\fR
If provided, instances will be preemptible and time\-limited. Instances might be
preempted to free up resources for standard VM instances, and will only be able
to run for a limited amount of time. Preemptible instances can not be restarted
and will not migrate. Use \fB\-\-preemptible\fR to enable and
\fB\-\-no\-preemptible\fR to disable.
.TP 2m
\fB\-\-private\-ipv6\-google\-access\-type\fR=\fIPRIVATE_IPV6_GOOGLE_ACCESS_TYPE\fR
The private IPv6 Google access type for the restored VM.
PRIVATE_IPV6_GOOGLE_ACCESS_TYPE must be one of: inherit\-subnetwork,
enable\-bidirectional\-access, enable\-outbound\-vm\-access
.TP 2m
\fB\-\-provisioning\-model\fR=\fIPROVISIONING_MODEL\fR
Specifies provisioning model, which determines price, obtainability, and runtime
for the restored VM instance. \fIPROVISIONING_MODEL\fR must be one of:
.RS 2m
.TP 2m
\fBSPOT\fR
Spot VMs are spare capacity; Spot VMs are discounted to have much lower prices
than standard VMs but have no guaranteed runtime. Spot VMs are the new version
of preemptible VM instances, except Spot VMs do not have a 24\-hour maximum
runtime.
.TP 2m
\fBSTANDARD\fR
Default. Standard provisioning model for VM instances, which has
user\-controlled runtime but no Spot discounts.
.RE
.sp
.TP 2m
\fB\-\-resource\-manager\-tags\fR=[\fIKEY\fR=\fIVALUE\fR,...]
Specifies a list of resource manager tags to apply to the instance.
.TP 2m
\fB\-\-resource\-policies\fR=\fIRESOURCE_POLICY\fR,[...]
A list of resource policy names to be added to the instance. The policies must
exist in the same region as the instance.
.TP 2m
\fB\-\-[no\-]restart\-on\-failure\fR
The instances will be restarted if they are terminated by Compute Engine. This
does not affect terminations performed by the user. Use
\fB\-\-restart\-on\-failure\fR to enable and \fB\-\-no\-restart\-on\-failure\fR
to disable.
.TP 2m
\fB\-\-service\-account\fR=\fISERVICE_ACCOUNT\fR
A service account is an identity attached to the instance. Its access tokens can
be accessed through the instance metadata server and are used to authenticate
applications on the instance. The account can be set using an email address
corresponding to the required service account. If not provided, the instance
will use the project's default service account.
.TP 2m
\fB\-\-tags\fR=\fITAG\fR,[\fITAG\fR,...]
Specifies a list of tags to apply to the instance. These tags allow network
firewall rules and routes to be applied to specified VM instances. See \fBgcloud
compute firewall\-rules create\fR(1) for more details.
.TP 2m
\fB\-\-threads\-per\-core\fR=\fITHREADS_PER_CORE\fR
The number of visible threads per physical core. To disable simultaneous
multithreading (SMT) set this to 1. Valid values are: 1 or 2.
For more information about configuring SMT, see:
https://cloud.google.com/compute/docs/instances/configuring\-simultaneous\-multithreading.
.TP 2m
\fB\-\-visible\-core\-count\fR=\fIVISIBLE_CORE_COUNT\fR
The number of physical cores to expose to the instance's guest operating system.
The number of virtual CPUs visible to the instance's guest operating system is
this number of cores multiplied by the instance's count of visible threads per
physical core.
.TP 2m
Specifies the reservation for the instance.
.RS 2m
.TP 2m
\fB\-\-reservation\fR=\fIRESERVATION\fR
The name of the reservation, required when
\f5\-\-reservation\-affinity=specific\fR.
.TP 2m
\fB\-\-reservation\-affinity\fR=\fIRESERVATION_AFFINITY\fR
Specifies the reservation affinity of the instance. \fIRESERVATION_AFFINITY\fR
must be one of:
.RS 2m
.TP 2m
\fBany\fR
Consume any available, matching reservation.
.TP 2m
\fBnone\fR
Do not consume from any reserved capacity.
.TP 2m
\fBspecific\fR
Must consume from a specific reservation.
.RE
.sp
.RE
.sp
.TP 2m
At most one of these can be specified:
.RS 2m
.TP 2m
\fB\-\-scopes\fR=[\fISCOPE\fR,...]
If not provided, the instance will be assigned the default scopes, described
below. However, if neither \-\-scopes nor \-\-no\-scopes are specified and the
project has no default service account, then the instance will be created with
no scopes. Note that the level of access that a service account has is
determined by a combination of access scopes and IAM roles so you must configure
both access scopes and IAM roles for the service account to work properly. SCOPE
can be either the full URI of the scope or an alias. Default scopes are assigned
to all instances. Available aliases are:
https://cloud.google.com/sdk/gcloud/reference/compute/instances/create#\-\-scopes
.TP 2m
\fB\-\-no\-scopes\fR
Create the instance with no scopes.
.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 "BRIEF"
Restores the specified backup
.SH "NOTES"
This variant is also available:
.RS 2m
$ gcloud alpha backup\-dr backups restore compute
.RE