When I use the GUI I get to choose multiple VMs to restore at once. Here is a copy of the Restore.log
Code: Select all
Restore job has been started, name 'IDC01SAS1', sessionId '6d8aab46-22a1-4238-8e35-27fdbad6e049, platform 'EVmware', restoreSpecrestoreSpec '
<ViVmRestoreSpec>
...
<RestoreType>MultiRestore</RestoreType>
...
</ViVmRestoreSpec>
Here is a copy of the restore.log when I run the restore via PowerShell.
Code: Select all
[26.06.2013 11:02:35] <01> Info Restore job has been started, name 'IDC01SAS1', sessionId '6d8aab46-22a1-4238-8e35-27fdbad6e049, platform 'EVmware', restoreSpec '
<ViVmRestoreSpec>
...
<RestoreType>SingleRestore</RestoreType>
...
</ViVmRestoreSpec>
Code: Select all
########## Restore Job ##########
##Set VM Name
$VCenterServerName = "10.100.102.112"
$BackupServerName = "esx1"
$ResourceName = "Training"
$DatastoreName = "Training Storage 3"
$BackupName = "IDC 3.0 SU1"
$FolderName = ""
## Array Index (FolderName,VMName), ..., (FolderName,VMName)
$vmMultiArray = @(
('C01','IDC01DB'),
('C01','IDC01SAS1'),
('C01','IDC01SAS2'),
('C02','IDC02DB'),
('C02','IDC02SAS1'),
('C02','IDC02SAS2'),
('C03','IDC03DB'),
('C03','IDC03SAS1'),
('C03','IDC03SAS2'),
('C04','IDC04DB'),
('C04','IDC04SAS1'),
('C04','IDC04SAS2'),
('C05','IDC05DB'),
('C05','IDC05SAS1'),
('C05','IDC05SAS2'),
('C06','IDC06DB'),
('C06','IDC06SAS1'),
('C06','IDC06SAS2'),
('C07','IDC07DB'),
('C07','IDC07SAS1'),
('C07','IDC07SAS2'),
('C08','IDC08DB'),
('C08','IDC08SAS1'),
('C08','IDC08SAS2'),
('C09','IDC09DB'),
('C09','IDC09SAS1'),
('C09','IDC09SAS2'),
('C10','IDC10DB'),
('C10','IDC10SAS1'),
('C10','IDC10SAS2'),
('C11','IDC11DB'),
('C11','IDC11SAS1'),
('C11','IDC11SAS2'),
('C12','IDC12DB'),
('C12','IDC12SAS1'),
('C12','IDC12SAS2')
)
##Get the vCenter Server:
$VCenterServer = Get-VBRServer –Name ($VCenterServerName)
$VCenterServer
##Get the Backup Server:
$BackupServer = Get-VBRServer –Name ($BackupServerName)
$BackupServer
##Get the Resource Pool:
$ResourcePool = Find-VBRViResourcePool -Server ($VCenterServer) -Name ($ResourceName)
$ResourcePool
##Get the Datastore
$Datastore = Find-VBRViDatastore -Server ($VCenterServer) -Name ($DatastoreName)
$Datastore
## Loop through all of the array Items to perform Restore
foreach ($vm in $vmMultiArray) {
##Get the Folder and check if it is different then the previous folder
if ($FolderName -ne $vm[0]) {
$FolderName = $vm[0]
$Folder = Find-VBRViFolder -Server $VCenterServer -Name ($FolderName)
$Folder
}
## Get VMName from array
$VMName = $vm[1]
##Get a list of available restore points, select the last restore point and save it into a variable
$RestorePoint = Get-VBRRestorePoint -Backup (Get-VBRBackup –Name ($BackupName)) –Name ($VMName) | select -Last (1)
$RestorePoint
##Perform Restore of the VM:
Start-VBRRestoreVM -RestorePoint ($RestorePoint) -Server ($BackupServer) -ResourcePool ($ResourcePool) -Datastore ($Datastore) -Folder ($Folder) -VMName ($VMName)
}