Start-VBRRestoreVM proxy

PowerShell script exchange

Start-VBRRestoreVM proxy

Veeam Logoby c82djau » Thu Jun 18, 2015 2:18 pm

Hi,

I use the command Start-VBRRestoreVM.
How can I specify a proxy to restore a VM ?

The Task created with the command Start-VBRRestoreVM return :

Code: Select all
Info                 : Veeam.Backup.Model.CRestoreSessionInfo
Initiator            : Veeam.Backup.Model.CRestoreSessionInfo+SInitiator
Platform             : EVmware
Options              : <ViVmRestoreSpec InitiatorName="" InitiatorSid="unknown"><OibId>d2415595-b551-43dc-ac56-01eacc37
                       6170</OibId><OibDate>635701683126430000</OibDate><VmName>MYVM</VmName><TargetVmName>tes
                       t_veeam</TargetVmName><BackupName>Metrologie</BackupName><TargetHostId>79f3812d-f5fd-48c5-b9c8-d
                       04b010ef2aa</TargetHostId><TargetHostName>MYESX</TargetHostName><TargetStorageR
                       ef>datastore-199340</TargetStorageRef><TargetStorageName>MYLUN</TargetStorag
                       eName><TargetResPoolRef>resgroup-478</TargetResPoolRef><TargetResPoolName>Resources</TargetResPo
                       olName><TargetVmFolderRef>group-v67</TargetVmFolderRef><TargetVmFolderName>vm</TargetVmFolderNam
                       e><IsPowerOn>False</IsPowerOn><MultiRestoreId>8f38e7c6-3062-4f69-93df-7d3218bd2e27</MultiRestore
                       Id><RestoreType>SingleRestore</RestoreType><TargetProxyAutoDetect>True</TargetProxyAutoDetect><R
                       estoreLocation>Different</RestoreLocation><SourceShareCredsId>00000000-0000-0000-0000-0000000000
                       00</SourceShareCredsId><TapeRestoreSessionId>00000000-0000-0000-0000-000000000000</TapeRestoreSe
                       ssionId><SqlAdditionalRestores /></ViVmRestoreSpec>
StateXml             : <StateXml />
LeaseId              : 00000000-0000-0000-0000-000000000000
FileLogger           : Veeam.Backup.Core.FileCommanderLogger
RestoreType          : SingleRestore
MultiRestoreId       : 8f38e7c6-3062-4f69-93df-7d3218bd2e27
RestoreSessionAudit  : Veeam.Backup.Core.RestoreSessionAudit
ItemsRestoreAudit    :
SessionInfo          : Veeam.Backup.Model.CRestoreSessionInfo
Id                   : 1d3a9cf2-ed01-461a-b124-3b71cb0d9be4
JobType              : RestoreVm
JobName              : MYVM
Name                 : MYVM
JobSpec              :
JobTypeString        : Full VM restore
Operation            :
Description          :
BaseProgress         : 0
IsCompleted          : False
IsWorking            : False
JobId                : 4e3421ae-a845-4402-baad-10c196d83175
Result               : None
State                : Starting
EndTime              : 01/01/1900 00:00:00
CreationTime         : 18/06/2015 14:47:52
AuxData              :
IsLowerAgentPriority : True
LogName              : MYVM
LogsSubFolder        : MYVM
Logger               : Veeam.Backup.Core.XmlLogger
Tracer               : Veeam.Backup.Core.CSessionLogTracer


I watch for this command but it must be set quickly after the task creation ?
Get-VBRJob -Name "Backup Job 01", "Backup Job 02" | Set-VBRJobProxy -Proxy $"SourceProxy"

Thanks,
David
c82djau
Novice
 
Posts: 3
Liked: 1 time
Joined: Thu Jun 18, 2015 2:00 pm
Full Name: c82djau

Re: Start-VBRRestoreVM proxy

Veeam Logoby v.Eremin » Thu Jun 18, 2015 2:30 pm

It's not possible to select particular proxy for VM restore via PowerShell. However, prior to restore within the script you can temporarily disable all proxies but one (Disable-VBRViProxy), and initiate restore (Start-VBRRestoreVM). Restore will have no other choices, but to pick the only left proxy. Thanks.
v.Eremin
Veeam Software
 
Posts: 13266
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin


Return to PowerShell



Who is online

Users browsing this forum: No registered users and 4 guests