Start-VBRRestoreVMFiles
Short Description
Restores VM configuration files.
Platform: VMware, Hyper-V
Product Edition: Standard, Enterprise, Enterprise Plus, Veeam Universal License
Syntax
|
Start-VBRRestoreVMFiles [-RestorePoint] <COib> [-Server] <CHost> [-Path] <String> [-Files <COIBFileInfo[]>] [-Reason <String>] [-RunAsync] [-Force] [<CommonParameters>] |
Detailed Description
This cmdlet allows you to restore configuration file (.vmx) or virtual disks (.vmdk) of a selected VM.
Note |
|
Run the |
Parameters
|
Parameter |
Description |
Type |
Required |
Position |
Accept Pipeline Input |
|---|---|---|---|---|---|
|
Files |
Specifies the files you want to restore. By default, all files from the VM will be restored.
Accepts the |
|
False |
Named |
True (ByPropertyName) |
|
Force |
Defines that the cmdlet will restore VM configuration files even if the location of the repository where VM backups reside and the target host location do not match. |
|
False |
Named |
False |
|
Path |
Specifies the string with the path to the folder where restored files should be saved. |
|
True |
2 |
False |
|
Reason |
Specifies the string with the reason for performing the VM guest OS file restore. |
|
False |
Named |
False |
|
RestorePoint |
Specifies the VM restore point to which you want to restore.
Accepts the |
|
True |
0 |
True (ByPropertyName, ByValue) |
|
RunAsync |
Defines that the command returns immediately without waiting for the task to complete. |
|
False |
Named |
False |
|
Server |
Specifies the host to which the VM guest files should be restored.
Accepts the |
|
True |
1 |
False |
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see Microsoft Docs.
Examples
Restoring All VM Guest OS Files
This example shows how to restore all VM guest OS files and save them on the Server007 host to the C:\BackupFiles folder.
|
$point = Get-VBRBackup -Name "MSExchange Backup" | Get-VBRRestorePoint -Name "MSExchange02" | Sort-Object CreationTime -Descending | Select -First 1 $server = Get-VBRServer -Name "Server007" Start-VBRRestoreVMFiles -RestorePoint $point -Server $server -Path "C:\BackupFiles" |
Perform the following steps:
- Get the restore point of the VM that you want to restore:
- Run the
Get-VBRBackupReturns backups. cmdlet. Specify theNameparameter value. - Pipe the cmdlet output to the
Get-VBRRestorePointReturns restore points. cmdlet. Specify theNameparameter value. - Pipe the cmdlet output to the
Sort-Objectcmdlet and specify theCreationTimeparameter value. - Pipe the cmdlet output to the
Selectcmdlet. Specify theFirstparameter value. - Save the result to the
$restorepointvariable.
- Run the
- Run the
Get-VBRServerReturns hosts connected to the backup infrastructure. cmdlet. Specify theNameparameter value. - Run the
Start-VBRRestoreVMFilescmdlet. Set the$pointvariable as theRestorePointparameter value. Set the$servervariable as theServerparameter value. Specify thePathparameter value.
Related Commands
Get-VBRRestorePointReturns restore points.Get-VBRServerReturns hosts connected to the backup infrastructure.Get-VBRFilesInRestorePointReturns backup files in a selected restore point.