PowerShell script exchange
Post Reply
pirx
Veteran
Posts: 599
Liked: 87 times
Joined: Dec 20, 2015 6:24 pm
Contact:

get max configured concurrent tasks on repository

Post by pirx »

Hi,

I found some threads about setting max tasks on repositories and this is working for me.

Code: Select all

Get-VBRBackupRepository -ScaleOut -Name xxxx | Get-VBRRepositoryExtent | Set-VBRBackupRepository -LimitConcurrentJobs -MaxConcurrentJobs 2
But I can't find out how to retrieve the number of concurrent tasks.
jhoughes
Veeam Vanguard
Posts: 282
Liked: 113 times
Joined: Apr 20, 2017 4:19 pm
Full Name: Joe Houghes
Location: Castle Rock, CO
Contact:

Re: get max configured concurrent tasks on repository

Post by jhoughes » 2 people like this post

You'll see the details of maximum tasks under the Options property of a repository, or a repository extent.

For a backup repository, you would use this:

Code: Select all

>$ex_repo = Get-VBRBackupRepository -Name "Exagrid*"                                                                                                                                                                                                                                                                                                                                                                                                                                            

>$ex_repo.Options                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

MaxTaskCount                : 10
IsTaskCountUnlim            : False
MaxArchiveTaskCount         : 5
CombinedDataRateLimit       : 0
Uncompress                  : False
OptimizeBlockAlign          : False
RemoteAccessLimitation      : Everyone
EpEncryptionEnabled         : False
MaxPointCount               : 2147483647
OneBackupFilePerVm          : True
IsAutoDetectAffinityProxies : True

>$ex_repo.Options.MaxTaskCount
10
The code to do this for a SOBR is basically the same, except that you have to step into the 'Repository' property to get to the 'Options' property:

Code: Select all

>$sobr = Get-VBRBackupRepository -ScaleOut -Name 'SOBR + S3' | Get-VBRRepositoryExtent                                                                                                                                                                                                                                                                                                                                                                                                          

>$sobr

ParentId   : fa508fbb-c9b7-49b2-980f-8f383fcc139d
Repository : Veeam.Backup.Core.CBackupRepository
Status     : Normal
Name       : EXAGRID - CIFS
Id         : 598340ec-dace-49c7-ace2-c93ef1d27277

>$sobr.Repository.Options

MaxTaskCount                : 4
IsTaskCountUnlim            : False
MaxArchiveTaskCount         : 2
CombinedDataRateLimit       : 0
Uncompress                  : False
OptimizeBlockAlign          : False
RemoteAccessLimitation      : None
EpEncryptionEnabled         : False
MaxPointCount               : 2147483647
OneBackupFilePerVm          : False
IsAutoDetectAffinityProxies : True                                                                                                                                                                                                                                                                                                                                                                                                                                                            
Husband, Father, Solutions Architect, Geek | @DenverVMUG & @DenverPSUG leader | International Speaker | Veeam Vanguard | vExpert (PRO) | Cisco Champion
pirx
Veteran
Posts: 599
Liked: 87 times
Joined: Dec 20, 2015 6:24 pm
Contact:

Re: get max configured concurrent tasks on repository

Post by pirx »

Thanks Joe, works linke a charm. Are these options/values documented somewhere?
oleg.feoktistov
Veeam Software
Posts: 2010
Liked: 669 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: get max configured concurrent tasks on repository

Post by oleg.feoktistov »

Hi @pirx,

In our Powershell Guide we usually document properties, which can be retrieved directly. You can explore the nested ones using either Get-Member cmdlet available natively or Show-Object cmdlet from Powershell Cookbook Module in the following way:

Code: Select all

Get-VBRBackupRepository | Get-Member
Get-VBRBackupRepository | Show-Object
Thanks!
aich365
Service Provider
Posts: 296
Liked: 23 times
Joined: Aug 10, 2016 11:10 am
Full Name: Clive Harris
Contact:

Re: get max configured concurrent tasks on repository

Post by aich365 »

Hi
We have more than one Repository and I'm trying to get tasks per repository to check setup, but my PowerShell skills are limited.
I have tried
Get-VBRBackupRepository | select Name, Options.MaxTaskCount | Sort-object Name | Export-Csv -Path C:\repotasks$(Get-Date -Format "yyyy-MM-dd").csv

and I have tried
>$ex_repo = Get-VBRBackupRepository -Name "Reponame"

>$ex_repo.Options

but this means I would have to do each repository in turn (and we have loads)

Any help would be much appreciated.
(Ideally I would like to be able to view it in VCC under infrastructure)

thanks
aich365
Service Provider
Posts: 296
Liked: 23 times
Joined: Aug 10, 2016 11:10 am
Full Name: Clive Harris
Contact:

Re: get max configured concurrent tasks on repository

Post by aich365 »

I have run
Get-VBRCloudTenant | select Name, MaxConcurrentTask | Sort-object Name | Export-Csv -Path C:\tenanttasks$(Get-Date -Format "yyyy-MM-dd").csv

and this returns tenants and tasks OK

Thanks
jhoughes
Veeam Vanguard
Posts: 282
Liked: 113 times
Joined: Apr 20, 2017 4:19 pm
Full Name: Joe Houghes
Location: Castle Rock, CO
Contact:

Re: get max configured concurrent tasks on repository

Post by jhoughes » 1 person likes this post

This should work for you:

Code: Select all

Get-VBRBackupRepository | select Name, @{n='TaskCount';e={$_.Options.MaxTaskCount}} | Export-Csv -Path C:\repotasks$(Get-Date -Format "yyyy-MM-dd").csv
As an FYI, if you go to investigate this in PowerShell docs, you're looking for a "calculated property".
Husband, Father, Solutions Architect, Geek | @DenverVMUG & @DenverPSUG leader | International Speaker | Veeam Vanguard | vExpert (PRO) | Cisco Champion
aich365
Service Provider
Posts: 296
Liked: 23 times
Joined: Aug 10, 2016 11:10 am
Full Name: Clive Harris
Contact:

Re: get max configured concurrent tasks on repository

Post by aich365 »

Joe
that's brilliant
very many thanks
best regards
Post Reply

Who is online

Users browsing this forum: No registered users and 26 guests