Hi
I'm using powershell automate most of my work on a daily basis.
I've been using powershell to (VM) tag our servers globally since it could be used for backup's in Veeam, I think this is very helpfull, and also allow admins who don't have access in Veeam to assign backup policies to their servers.
I've started to looking into automating SureBackup, but I've run into a MAJOR issue (for me when I want to use powershell).
When you use tags for backups, you can't do a simple "Get-VBRJobObject", as the only object in there is the tag, not the machines
Like this:
Get-VBRJob -Name "Backup Job 1" | Get-VBRJobObject -Name *ServerName*
This returns nothing, as there's no machines, only a tag
Get-VBRJob -Name "Backup Job 1" | Get-VBRJobObject -Name *TagName*
This returns the tag object, but I can't find a way to retrieve the "Veeam.Backup.Core.CObjectInJob" of the machines
And I need this type of object to run the "New-VBRSureBackupVM" commandline
Any advice on how to get this object so I can get it working ?
I'm out of ideas right now
(Case #04425786)
-
- Influencer
- Posts: 13
- Liked: 1 time
- Joined: May 28, 2015 8:48 am
- Full Name: Rene Meyer
- Location: Denmark
- Contact:
-
- Veeam Software
- Posts: 2010
- Liked: 670 times
- Joined: Sep 25, 2019 10:32 am
- Full Name: Oleg Feoktistov
- Contact:
Re: SureBackup and using VM Tags to select the backups
Hi Rene,
The entity you add as an object to your job becomes the child one with no other sub-levels. So, no way to get it working currently just yet.
However, we prepared -Tag parameter in New-VBRSureBackupVM cmdlet for v11, which will allow you to invoke it on tags normally.
Thanks,
Oleg
The entity you add as an object to your job becomes the child one with no other sub-levels. So, no way to get it working currently just yet.
However, we prepared -Tag parameter in New-VBRSureBackupVM cmdlet for v11, which will allow you to invoke it on tags normally.
Thanks,
Oleg
-
- Novice
- Posts: 4
- Liked: never
- Joined: Feb 19, 2020 9:23 am
- Full Name: Thomas Kuster
- Contact:
Re: SureBackup and using VM Tags to select the backups
Hi Rene,
I have the same problem but found a workaround that works for me. In a scheduled script I delete the application group and the sure backup job. Then I search for a random vm name (string) and add a new application group
-> $AppGroup = Add-VSBViApplicationGroup -Name $AppGroupName -VmFromBackup (Find-VBRViEntity -Name $backups[$randomVmNr]) -> $backups is a array of strings. Then I add a new surebackup job and use the new application group.
-> $VsbJob = Add-VSBJob -Name $SbJobName -VirtualLab $VirtualLab -AppGroup $AppGroup -Description $SbJobDesc
This way I can test one random vm per day in the surebackup job and don't need to change the application group and don't need the Veeam.Backup.Core.CObjectInJob. A disadvantage is that you have no statistic history because you have every day a new surebackup job. Maybe it helps you.
But I also hope for v11 and -Tag parameter in New-VBRSureBackupVM cmdlet
Best regards
Thomas
I have the same problem but found a workaround that works for me. In a scheduled script I delete the application group and the sure backup job. Then I search for a random vm name (string) and add a new application group
-> $AppGroup = Add-VSBViApplicationGroup -Name $AppGroupName -VmFromBackup (Find-VBRViEntity -Name $backups[$randomVmNr]) -> $backups is a array of strings. Then I add a new surebackup job and use the new application group.
-> $VsbJob = Add-VSBJob -Name $SbJobName -VirtualLab $VirtualLab -AppGroup $AppGroup -Description $SbJobDesc
This way I can test one random vm per day in the surebackup job and don't need to change the application group and don't need the Veeam.Backup.Core.CObjectInJob. A disadvantage is that you have no statistic history because you have every day a new surebackup job. Maybe it helps you.
But I also hope for v11 and -Tag parameter in New-VBRSureBackupVM cmdlet
Best regards
Thomas
Who is online
Users browsing this forum: No registered users and 13 guests