PowerShell script exchange
meisve
Novice
Posts: 5 Liked: never
Joined: Jan 14, 2020 1:16 pm
Full Name: Andreas Meister
Contact:
Post
by meisve » May 03, 2021 6:29 am
this post
Hello all,
I want to change the "Limit maximum concurrent tasks" in 3 steps on serveral repositories (50). From current 20 tasks, step by step, to 50 tasks ... but I don't want it change by the gui - 50 repositories.
I found the cmdlet "Set-VBRBackupRepository" with option -MaxConcurrentJobs <int> ... but it's only run for repository without SBOR?!?
Code: Select all
PS D:\> Get-VBRBackupRepository
Name Type Host FriendlyPath Description
---- ---- ---- ------------ -----------
Default Backup Repository WinLocal xxx.mgm... D:\Backup Created by Veeam Backup
How can I change the setting of the repositories, when the repositories are in SBOR?
Thanks for help
BR
Andreas
Dima P.
Product Manager
Posts: 14726 Liked: 1706 times
Joined: Feb 04, 2013 2:07 pm
Full Name: Dmitry Popov
Location: Prague
Contact:
Post
by Dima P. » May 03, 2021 9:17 am
this post
Andreas,
Concurrent task value is set per extent of every Scale-Out repository, to change it you need to modify the values for every repository added as extents. Looks like the VBRBackupRepository family of cmdlets is the correct way of doing that but I'll leave this topic open for our PowerShell gurus to comment.
oleg.feoktistov
Veeam Software
Posts: 2010 Liked: 670 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:
Post
by oleg.feoktistov » May 03, 2021 1:29 pm
this post
Dmitry is right. Since in powershell SOBR extents don't appear in the output of Get-VBRBackupRepository cmdlet, you need to obtain repository object for each extent to make it work. Example:
Code: Select all
$sobr = Get-VBRBackupRepository -ScaleOut
$extent = Get-VBRRepositoryExtent -Repository $sobr
Set-VBRBackupRepository -Repository $extent[0].Repository -LimitConcurrentJobs -MaxConcurrentJobs 50
Thanks,
Oleg
meisve
Novice
Posts: 5 Liked: never
Joined: Jan 14, 2020 1:16 pm
Full Name: Andreas Meister
Contact:
Post
by meisve » May 03, 2021 2:01 pm
this post
thanks Oleg for the example
and I tried it in small test environment:
there is one SBOR with two extents, default 4 max concurrent tasks is acitved
Code: Select all
$sobr = Get-VBRBackupRepository -ScaleOut
$extent = Get-VBRRepositoryExtent -Repository $sobr
Set-VBRBackupRepository -Repository $extent[0].Repository -LimitConcurrentJobs -MaxConcurrentJobs 8
the tasks will changed by only one extent
Code: Select all
$sobr = Get-VBRBackupRepository -ScaleOut
Get-VBRRepositoryExtent -Repository $sobr
Code: Select all
StoreFull : True
StoreIncrement : True
ParentId : 5cc63b68-a870-4a3c-b12e-c8d91e87e371
Repository : Veeam.Backup.Core.CBackupRepository
Status : Normal
Name : xxx02_2
Id : 7ea5ac60-6d08-459a-a341-1a92a113c1f9
StoreFull : True
StoreIncrement : True
ParentId : 5cc63b68-a870-4a3c-b12e-c8d91e87e371
Repository : Veeam.Backup.Core.CBackupRepository
Status : Normal
Name : xxx01_2
Id : 2366795b-4a84-441d-8476-202b153c56bb
extent with name xxx02_2 changed to 8 concurrent tasks
thanks and reagards,
Andreas
oleg.feoktistov
Veeam Software
Posts: 2010 Liked: 670 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:
Post
by oleg.feoktistov » May 03, 2021 2:09 pm
this post
Yep, that's only an example. To set the same amount of concurrent tasks across all extents you need to iterate over them in a foreach loop:
Code: Select all
$sobr = Get-VBRBackupRepository -ScaleOut
$extents = Get-VBRRepositoryExtent -Repository $sobr
foreach ($extent in $extents) {
Set-VBRBackupRepository -Repository $extent.Repository -LimitConcurrentJobs -MaxConcurrentJobs 8
}
Also, please, use </> label instead of quotes to wrap your code. It looks cleaner and can be easily copied for a test.
Thanks,
Oleg
meisve
Novice
Posts: 5 Liked: never
Joined: Jan 14, 2020 1:16 pm
Full Name: Andreas Meister
Contact:
Post
by meisve » May 03, 2021 2:27 pm
this post
thanks Oleg ... it's works
I am still a newcomer to the forum and I will stick to it
Thanks again
Andreas
Users browsing this forum: No registered users and 10 guests