I have imported a Backup from another Server
Code: Select all
$server = Get-VBRServer -Name "192.168.1.40"
Import-VBRBackup -Server 192.168.5.101 –FileName "E:\Backups\vm1\vm1.vbm"
PS C:\scripts> Get-VBRRestorePoint
VM Name Creation Time Type
------- ------------- ----
vm1 01.03.2022 15:29:42 Full
vm2 28.02.2022 19:34:55 Full
When Restore the local created backup "vm2" this works
Code: Select all
Restore Type VM Name State Start Time End Time Description
------------ ------- ----- ---------- -------- -----------
RestoreVm vm2 Stopped 01.03.2022 16:00:43 01.03.2022 16:03:02
the Imported Backup: vm1 I can not restore.... it is the same command only vm1 insted of vm2
Start-VBRRestoreVM : Das Argument für den Parameter "RestorePoint" kann nicht überprüft werden. Das Argument ist NULL. Geben Sie einen gültigen Wert für das Argument an, und führen Sie den Befehl erneut aus.
In C:\scripts\vsss.ps1:16 Zeichen:34
+ Start-VBRRestoreVM –RestorePoint $restorepoint[1] –Server $server –Re ...
+ ~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Start-VBRRestoreVM], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationError,Veeam.Backup.PowerShell.Cmdlets.StartVBRRestoreVM
When do the restore of the imported Backup in the GUI it works!
vsss.ps1
Code: Select all
Param(
[String]$restorepointname = "HELP" # VMName
,[String]$serverip = "HELP" # vCenter IP
,[String]$rpoolname = "HELP" # Destiation ResourcePool
,[String]$datastorename = "HELP" # Destiation Datastore
,[String]$foldername = "HELP" # Destiation Folder
)
$restorepoint = Get-VBRRestorePoint -Name $restorepointname
$server = Get-VBRServer -Name $serverip
$rpool = Find-VBRViResourcePool -Name $rpoolname -Server $server
$datastore = Find-VBRViDatastore -Name $datastorename -Server $server
$folder = Find-VBRViFolder -Name $foldername -Server $server
Start-VBRRestoreVM –RestorePoint $restorepoint[1] –Server $server –ResourcePool $rpool –Datastore $datastore –PowerUp $false