-
- Enthusiast
- Posts: 82
- Liked: 2 times
- Joined: Jan 30, 2013 9:32 am
- Contact:
way to run Agent Backup Job on VBR console using PowerShell
Hello,
VBR 9.5 U3 was released, Veeam Agent was integrated.
I want to run Agent Backup Job on VBR console using PowerShell.
It could not be run with the following command.
----
Get-VBRJob -Name "Agent Backup Job 1" | Start-VBRJob
----
Do you know any way?
VBR 9.5 U3 was released, Veeam Agent was integrated.
I want to run Agent Backup Job on VBR console using PowerShell.
It could not be run with the following command.
----
Get-VBRJob -Name "Agent Backup Job 1" | Start-VBRJob
----
Do you know any way?
-
- Product Manager
- Posts: 14726
- Liked: 1707 times
- Joined: Feb 04, 2013 2:07 pm
- Full Name: Dmitry Popov
- Location: Prague
- Contact:
Re: way to run Agent Backup Job on VBR console using PowerSh
Hello Yuya,
PowerShell options in this version are limited to host discovery and agent deployment tasks, but we plan to provide full PS support for agent management in next version. If there is a workaround now, I am sure v.Eremin will provide it.
PowerShell options in this version are limited to host discovery and agent deployment tasks, but we plan to provide full PS support for agent management in next version. If there is a workaround now, I am sure v.Eremin will provide it.
-
- Veeam Software
- Posts: 1818
- Liked: 655 times
- Joined: Mar 02, 2012 1:40 pm
- Full Name: Timothy Dewin
- Contact:
Re: way to run Agent Backup Job on VBR console using PowerSh
Highly unsupported and did yield an error:
Code: Select all
$agentname = "VBR"
[Veeam.Backup.Core.CBackupJob]::Find($agentname) | Start-VBRJob
-
- Service Provider
- Posts: 10
- Liked: 5 times
- Joined: May 19, 2016 3:45 pm
- Full Name: Bryan Buchan
- Contact:
Re: way to run Agent Backup Job on VBR console using PowerSh
I just want to be able to get the metadata from the job. The integrated agent jobs don't show up under Get-VBRJob. Am I gonna have to do a SQL query instead?? This is pretty critical to our monitoring processes and I would appreciate any help you have. Thanks.
-
- Veeam Software
- Posts: 1818
- Liked: 655 times
- Joined: Mar 02, 2012 1:40 pm
- Full Name: Timothy Dewin
- Contact:
Re: way to run Agent Backup Job on VBR console using PowerSh
[Veeam.Backup.Core.CBackupJob]::Find($agentname) should return the job
-
- Service Provider
- Posts: 327
- Liked: 23 times
- Joined: Oct 09, 2012 2:30 pm
- Full Name: Maso
- Contact:
Re: way to run Agent Backup Job on VBR console using PowerSh
Hi
I understand you don't have ps support yet with vbr agent backup job created from protection group. But is there a way around to get all VBR Agent jobs and there job objects?
\Masonit
I understand you don't have ps support yet with vbr agent backup job created from protection group. But is there a way around to get all VBR Agent jobs and there job objects?
\Masonit
-
- Veeam Software
- Posts: 1818
- Liked: 655 times
- Joined: Mar 02, 2012 1:40 pm
- Full Name: Timothy Dewin
- Contact:
Re: way to run Agent Backup Job on VBR console using PowerSh
Again this is not supported and probably in a next update, powershell agent management will expand
Getting the jobs
Checking what protection groups are added to a job (assuming it is the same for linux jobs)
Find the last session and child sessions (although the child sessions seems a bit cryptic)
Again this is unsupported and I'm not part of R&D so I'm just discovering by tabbing + using get-member extensivelly
Getting the jobs
Code: Select all
$alljobs = [Veeam.Backup.Core.CBackupJob]::GetAll()
$winjobs = $alljobs | ? { $_.backupplatform -eq [Veeam.Backup.Common.CPlatform]::EndPoint }
$linjobs = $alljobs | ? { $_.backupplatform -eq [Veeam.Backup.Common.CPlatform]::LinuxPhysical }
Code: Select all
$winjob = $winjobs[0]
PS C:\Users\Administrator> $winjob.GetDesktopOij()
Name Type ApproxSize Location
---- ---- ---------- --------
Protection Group 1 Include 0.0 B
Code: Select all
PS C:\Users\Administrator> $lastrun = $winjob.FindLastSession()
PS C:\Users\Administrator> $lastrun
Job Name State Start Time End Time Result
-------- ----- ---------- -------- ------
Agent Backup Job 3 Stopped Success
$lastrun.GetChildSessions()
-
- Service Provider
- Posts: 327
- Liked: 23 times
- Joined: Oct 09, 2012 2:30 pm
- Full Name: Maso
- Contact:
Re: way to run Agent Backup Job on VBR console using PowerSh
Works fine, thanks!
\Masonit
\Masonit
-
- Product Manager
- Posts: 20415
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: way to run Agent Backup Job on VBR console using PowerSh
Just so you know - Update 4 will have fully functional PowerShell model for agent management functionality. Starting from Update 4 creative workarounds won't be needed any longer. Thanks.
-
- Service Provider
- Posts: 327
- Liked: 23 times
- Joined: Oct 09, 2012 2:30 pm
- Full Name: Maso
- Contact:
Re: way to run Agent Backup Job on VBR console using PowerShell
One more workaround needed..
Tried starting a agent management job with start-vbrjob. But that didn't work. Is there a way around this? Tried looking for methods to use but no luck.
\Masonit
Tried starting a agent management job with start-vbrjob. But that didn't work. Is there a way around this? Tried looking for methods to use but no luck.
\Masonit
-
- Product Manager
- Posts: 20415
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: way to run Agent Backup Job on VBR console using PowerShell
Doesn't it work, if you get agent job, using the workaround above?
Thanks!
Code: Select all
$alljobs = [Veeam.Backup.Core.CBackupJob]::GetAll()
$winjobs = $alljobs | ? { $_.backupplatform -eq [Veeam.Backup.Common.CPlatform]::EndPoint }
$Job = $Winjobs | where {$_.Name -eq "Name of your Job"}
Start-VBRJob -Job $Job
-
- Service Provider
- Posts: 327
- Liked: 23 times
- Joined: Oct 09, 2012 2:30 pm
- Full Name: Maso
- Contact:
Re: way to run Agent Backup Job on VBR console using PowerShell
Sorry for late reply. But it does not work:
*Edit* - Sorry but it did work.. Job started eventhough start-vbrjob reported above error. Not so clean..
\Masonit
Code: Select all
Start-VBRJob : Job session with id '00000000-0000-0000-0000-000000000000' was not found
At line:1 char:1
+ Start-VBRJob -Job $Job
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Start-VBRJob], Exception
+ FullyQualifiedErrorId : System.Exception,Veeam.Backup.PowerShell.Cmdlets.StartVBRJob
\Masonit
-
- Product Manager
- Posts: 20415
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: way to run Agent Backup Job on VBR console using PowerShell
It's still a creative workaround, so some artifacts like the one above are absolutely possible.
Good to know, though, that everything is working regardless of exception reported.
Thanks!
Good to know, though, that everything is working regardless of exception reported.
Thanks!
Who is online
Users browsing this forum: No registered users and 4 guests