Start-VBRRestoreVirtualDisks
Short Description
Restores physical disks to virtual disk formats.
Applies to
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus, Veeam Universal License
Syntax
Start-VBRRestoreVirtualDisks [-RestorePoint] <COib> [-Server] <CHost> [-Path] <string> -RestoreDiskType {Vmdk | Vhd | Vhdx} [-Datastore <VBRViDatastoreBase>] [-StorageFormat {Thin | Thick | EagerZeroedThick | Fixed | Dynamic}] [-Files <COIBFileInfo[]>] [-SourceShareCredentials <CCredentials>] [-TargetShareCredentials <CCredentials>] [-Reason <string>] [-EnableAntivirusScan] [-EnableEntireVolumeScan] [-ProceedToRecoveryIfThreatFound] [-RunAsync] [<CommonParameters>] |
Detailed Description
This cmdlet restores physical disks from volume-level backups created by Veeam Agent operating in a standalone mode and converts them to the following format:
- VMDK
- VHDX
- VHD
The cmdlet allows you to scan the disks that you want to restore with the antivirus.
Run Start-VBRRestoreVMFiles to restore VM configuration files.
|
In case the antivirus detects the virus threat, Veeam Backup & Replication will cancel the restore session. |
Parameters
Parameter | Description | Required | Position | Accept |
---|---|---|---|---|
RestorePoint | Specifies the restore point from which you want to restore the disks. You must select restore points only from Veeam Agent for Microsoft Windows volume-level backups. | True | 1 | True (ByValue, |
Server | Specifies the Windows host to which the disks should be restored. | True | 2 | False |
Path | Specifies the path to the folder on the target server. The cmdlet will register virtual disks in this folder. | True | 3 | False |
RestoreDiskType | Specifies the format to which you want to convert the resulting virtual disk:
| False | Named | False |
StorageFormat | Specifies the format that will be used to convert the resulting virtual disk:
Default: Source. | False | Named | False |
Datastore | Specifies a target datastore. The cmdlet will register converted disks to this datastore. Note: You must provide the Path parameter to specify the path to the folder in the datastore where you want to keep the converted disks. You must create the necessary folder beforehand. | False | Named | False |
Files | Specifies the disks from the backup that you want to restore. Default: all. | False | Named | True (ByProperty |
SourceShareCredentials | Specifies the credentials for the backup repository. The cmdlet will export the backup from this repository. | False | Named | False |
TargetShareCredentials | Specifies the credentials for the shared folder. The cmdlet will add the exported files to that folder. | False | Named | False |
Reason | Specifies the reason for performing the disk restore. | False | Named | False |
EnableAntivirusScan | Indicates that the cmdlet will perform secure restore. Veeam Backup & Replication will trigger the antivirus software to scan selected machines before the restore. | False | Named | False |
EnableEntireVolumeScan | For secure restore. Indicates that the antivirus will continue physical discs scan after the first virus threat is found. Use this option if you want to get the report on all virus threats. | False | Named | False |
ProceedToRecoveryIfThreatFound | For secure restore. Indicates that if antivirus detects malware, the cmdlet will restore physical disks. | False | Named | False |
RunAsync | Indicates that the command returns immediately without waiting for the task to complete. | False | Named | False |
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see the About CommonParameters section of Microsoft Docs.
Example 1
This example shows how to restore all physical disks from volume-level backups created by Veeam Agent operating in a standalone mode. The cmdlet will restore disks to a Veeam backup server. The disks are restored to the latest restore point. The resulting format is VMDK.
- Run Get-VBRLocalhost to get the Veeam backup server. Save it to the $server variable.
- Get the most recent restore point. Run Get-VBRRestorePoint and filter the array of restore points with Sort-Object method by the "CreationTime" property. Save the result to the $restorepoint variable.
- Run Start-VBRRestoreVirtualDisks with the $restorepoint and $server variables.
$server = Get-VBRLocalhost $restorepoint = Get-VBRBackup -Name "Backup Job SRV03" | Get-VBRRestorePoint | Sort-Object -Property CreationTime | Select-Object -First 1 Start-VBRRestoreVirtualDisks -RestorePoint $restorepoint -Server $server -Path "C:\SRV03_Restored" -RestoreDiskType Vmdk -RunAsync |
Example 2
This example shows how to restore specified disks to a Windows server added to Veeam Backup & Replication. The disks are restored to the latest restore point. The resulting format is VHDX.
- Get the most recent restore point. Run Get-VBRRestorePoint and filter the array of restore points with Sort-Object method by the "CreationTime" property. Save the result to the $restorepoint variable.
- Run Get-VBRServer to get the server and save it to the $server variable.
- Run Get-VBRFilesInRestorePoint to get the disks in the backup. Save the result to the $disks variable. In this example, disks 1 and 3 will be restored.
- Run Start-VBRRestoreVirtualDisks. Use the $restorepoint, $server and $disks variables.
$restorepoint = Get-VBRBackup -Name "Backup Job SRV03" | Get-VBRRestorePoint | Sort-Object -Property CreationTime | Select-Object -First 1 $server = Get-VBRServer -Type Windows -Name "Veeam_Remote" $disks = Get-VBRFilesInRestorePoint -RestorePoint $restorepoint Start-VBRRestoreVirtualDisks -RestorePoint $restorepoint -Server $server -Path "C:\SRV03_Restored" -RestoreDiskType Vhdx -Files $disks[1,3] -RunAsync |
Example 3
This example shows how to restore selected disks to the 172.17.42.11 ESXi host and register them on the srv07-DAS1 datastore.
- Run the Get-VBRBackup cmdlet. Specify the Name parameter value. Save the result to the $backup variable.
- Run the Get-VBRRestorePoint cmdlet. Specify the Name and Backup parameter values. Save the result to the $restorepoint variable.
- Run the Get-VBRServer cmdlet. Specify the Name parameter value. Save the result to the $server variable
- Run the Find-VBRViDatastore cmdlet. Specify the Server and Backup parameter values. Save the result to the $datastore variable
- Run the Start-VBRRestoreVirtualDisks cmdlet. Use the $rp, $server and $datastore variables.
$backup = Get-VBRBackup -Name "MSExchange" $rp = Get-VBRRestorePoint -Name *MSExchange02* -Backup $backup $server = Get-VBRServer -Name "172.17.42.11" $datastore = Find-VBRViDatastore -Server "172.17.42.11" -Name "srv07-DAS1" Start-VBRRestoreVirtualDisks -RestorePoint $rp -Server $server -Path "test" -Datastore $datastore -RestoreDiskType Vmdk -StorageFormat Thin |
Related Commands