Start-VBRVMRestoreToGoogleCloud
Short Description
Starts a restore session to Google Compute Engine.
Applies to
Platform: VMware, Hyper-V
Product Edition: Community, Standard, Enterprise, Enterprise Plus, Veeam Universal License
Syntax
Start-VBRVMRestoreToGoogleCloud -RestorePoint <COib> -Zone <VBRGoogleCloudComputeZone> [-LicenseType <VBRGoogleCloudLicenseType>] -InstanceType <VBRGoogleCloudComputeInstanceType> -VMName <string> -DiskConfiguration <VBRGoogleCloudComputeDiskConfiguration[]> -Subnet <VBRGoogleCloudComputeSubnet> [-Reason <string>] [-EnableAntivirusScan] [-EnableYARAScan] [-YARAScanRule <String>] [-EnableEntireVolumeScan] [-VirusDetectionAction {ConnectToIsolatedNetwork | AbortRecovery}] [-VirusIsolatedSubnet <VBRGoogleCloudComputeSubnet>] [-ProxyAppliance <VBRGoogleCloudComputeProxyAppliance>] [-GoogleCloudLabel <VBRGoogleCloudComputeLabel[]>] [-ShutdownVM] [-AllocatePublicIP] [-Wait] [<CommonParameters>] |
Detailed Description
This cmdlet starts a restore session to Google Compute Engine.
Parameters
Parameter | Description | Type | Required | Position | Accept |
---|---|---|---|---|---|
RestorePoint | Specifies the restore point of machines that you want to restore to Google Compute Engine. | Accepts the COib object. To get this object, run the Get-VBRRestorePoint cmdlet. | True | Named | False |
Zone | Specifies the Google Cloud availability zone. The cmdlet will restore the VM to this Google Cloud availability zone. | Accepts the VBRGoogleCloudComputeZone object. To get this object, run the Get-VBRGoogleCloudComputeZone cmdlet. | True | Named | False |
InstanceType | Specifies the Google Cloud VM instance type. The cmdlet will restore the VM with the CPU and memory settings of the selected VM instance. | Accepts the VBRGoogleCloudComputeInstanceType object. To get this object, run the Get-VBRGoogleCloudComputeInstanceType cmdlet. | True | Named | False |
VMName | Specifies the name for the target Google Cloud instance. Veeam Backup & Replication will restore the VM instance with this name. | String | True | Named | False |
DiskConfiguration | Specifies the array of disk settings for Google Cloud VM instances. | Accepts the VBRGoogleCloudComputeDiskConfiguration object. To add this object, run the New-VBRGoogleCloudComputeDiskConfiguration cmdlet. | True | Named | False |
Subnet | Specifies the Google Cloud subnet. | Accepts the VBRGoogleCloudComputeSubnet object. To get this object, run the Get-VBRGoogleCloudComputeSubnet cmdlet. | True | Named | False |
LicenseType | Specifies the OS license. You can select the following types of licenses:
| VBRGoogleCloudLicenseType | False | Named | False |
Reason | Specifies the restore reason. | String | False | Named | False |
EnableAntivirusScan | Enables secure restore. If you provide this parameter, Veeam Backup & Replication will trigger the antivirus software to scan selected VMs before the restore. | SwitchParameter | False | Named | False |
EnableYARAScan | Enables the YARA scan for the selected VMs. Use the YARAScanRule parameter to specify the YARA rule to be used. | SwitchParameter | False | Named | False |
YARAScanRule | Specifies the YARA rule. Veeam Backup & Replication will scan VMs with this rule. Veeam Backup & Replication searches for YARA rules by the following path: C:\Program Files\Veeam\Backup and Replication\Backup\YaraRules. To use the Yara rule, you must specify its name and extension. Veeam Backup & Replication accepts only .yar and .yara extension. | String | False | Named | False |
EnableEntireVolumeScan | For secure restore. Enables VMs scan by an antivirus after the first virus threat is found. If you provide this parameter, the cmdlet will generate a report on all virus threats. | SwitchParameter | False | Named | False |
VirusDetectionAction | For secure restore. Specifies secure restore action when the virus threat is detected.
| Enum | False | Named | False |
VirusIsolatedSubnet | Specifies the Google Cloud subnet where the restore will be performed if Veeam Backup & Replication detects any virus threats. Note: This parameter is required if you set the ConnectToIsolatedNetwork option for the VirusDetectionAction parameter value. | Accepts the VBRGoogleCloudComputeSubnet object. To get this object, run the Get-VBRGoogleCloudComputeSubnet cmdlet. | False | Named | False |
ProxyAppliance | Specifies the Google Cloud proxy appliance. | Accepts the VBRGoogleCloudComputeProxyAppliance object. To add this object, run the New-VBRGoogleCloudComputeProxyAppliance cmdlet. | False | Named | False |
GoogleCloudLabel | Specifies an array of Google Cloud labels. The cmdlet will restore VMs with the specified labels. | Accepts the VBRGoogleCloudComputeLabel object. To add this object, run the New-VBRGoogleCloudComputeLabel cmdlet. | False | Named | False |
ShutdownVM | Defines that the cmdlet will power off the restored VM after the restore is complete. If you do not provide this parameter, the restored VM will remain powered on. | SwitchParameter | False | Named | False |
AllocatePublicIP | Defines that the cmdlet will assign a public IP to the restored VM. If you do not provide this parameter, the restored VM will remain without the public IP. | SwitchParameter | False | Named | False |
Wait | Defines that the command will wait for the process to complete before accepting more input. | SwitchParameter | False | Named | False |
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see Microsoft Docs.
Output Object
Examples
Starting Session of Machine Restore to Google Compute Engine
This example shows how to restore machines to Google Compute Engine.
$backup = Get-VBRBackup -Name "MSExchange Backup" $restorepoint = Get-VBRRestorePoint -backup $backup $account = Get-VBRGoogleCloudComputeAccount -Name "GCP service acc 1" $computeregion = Get-VBRGoogleCloudComputeRegion -Account $account $computezone = Get-VBRGoogleCloudComputeZone -Region $computeregion $instancetype = Get-VBRGoogleCloudComputeInstanceType -Zone $computezone $diskconfig = New-VBRGoogleCloudComputeDiskConfiguration -DiskName "srv20.vhdx" -DiskType StandardPersistent $subnet = Get-VBRGoogleCloudComputeSubnet -Region $computeregion $label = New-VBRGoogleCloudComputeLabel -Key "location" -Value "west" Start-VBRVMRestoreToGoogleCloud -RestorePoint $restorepoint -Zone $computezone -InstanceType $instancetype -VMName "Restored VM" -DiskConfiguration $diskconfig -Subnet $subnet -Reason "Data recovery" -EnableAntivirusScan -EnableEntireVolumeScan -VirusDetectionAction AbortRecovery -GoogleCloudLabel $label -AllocatePublicIP |
Perform the following steps:
- Run the Get-VBRBackup cmdlet. Provide the Name parameter value. Save the result to the $backup variable.
- Run the Get-VBRRestorePoint cmdlet. Set the $backup variable as the backup parameter. Save the result to the $restorepoint variable.
- Run the Get-VBRGoogleCloudComputeAccount cmdlet. Provide the Name parameter value. Save the result to the $account variable.
- Run the Get-VBRGoogleCloudComputeRegion cmdlet. Set the $account variable as the Account parameter. Save the result to the $computeregion variable.
- Run the Get-VBRGoogleCloudComputeZone cmdlet. Set the $computeregion variable as the Region parameter. Save the result to the $computezone variable.
- Run the Get-VBRGoogleCloudComputeInstanceType cmdlet. Set the $computezone variable as the Zone parameter. Save the result to the $instancetype variable.
- Run the New-VBRGoogleCloudComputeDiskConfiguration cmdlet. Specify the DiskName and DiskType parameter values. Save the result to the $diskconfig variable.
- Run the Get-VBRGoogleCloudComputeSubnet cmdlet. Set the $computeregion variable as the Region parameter. Save the result to the $subnet variable.
- Run the New-VBRGoogleCloudComputeLabel cmdlet. Specify the Key and Value parameter values. Save the result to the $label variable.
- Run the Start-VBRVMRestoreToGoogleCloud cmdlet. Specify the following settings:
- Set the $restorepoint variable as the RestorePoint parameter value.
- Set the $computezone variable as the Zone parameter value.
- Set the $instancetype variable as the InstanceType parameter value.
- Specify the VMName parameter value.
- Set the $diskconfig variable as the DiskConfiguration parameter value.
- Set the $subnet variable as the Subnet parameter value.
- Specify the Reason parameter value.
- Provide the EnableAntivirusScan parameter.
- Provide the EnableEntireVolumeScan parameter.
- Set the AbortRecovery option for the VirusDetectionAction parameter value.
- Set the $label variable as the GoogleCloudLabel parameter value.
- Provide the AllocatePublicIP parameter.
Related Commands