PowerShell script exchange
Post Reply
BoRiisDK
Novice
Posts: 4
Liked: 2 times
Joined: May 14, 2018 12:07 pm
Full Name: Bo Riis
Location: Aalborg, Denmark
Contact:

Get and Set Concurrent Tasks on SOBR extent

Post by BoRiisDK »

Hi

I have had to change the concurrent tasks on alot of SOBR extents lately, and I have not found an easy way to do this using powershell.

Ideally I would like something like this:
Get all SOBR to list them
Get the SOBR i need to change and list current concurrent task setting on all extents.
Get the SOBR i need to change and set new concurrent task limit on each extent.

We have a rather uniform storage environment so this is possible as allmost all extents are similar.

Thanks in advance
Regards
veremin
Product Manager
Posts: 20283
Liked: 2258 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Get and Set Concurrent Tasks on SOBR extent

Post by veremin »

Check this example:

Code: Select all

asnp VeeamPSSnapin
$SOBR = Get-VBRBackupRepository -ScaleOut -Name "Name of your SOBR"
$Extent = Get-VBRRepositoryExtent -Repository $SOBR | where {$_.name -eq "Name of your extent"}
$Repository = $Extent.Repository
Set-VBRBackupRepository -Repository $Repository -LimitConcurrentJobs -MaxConcurrentJobs "Whatever number you like"
Thanks!
Vek17
Service Provider
Posts: 49
Liked: 15 times
Joined: May 29, 2018 8:42 pm
Contact:

Re: Get and Set Concurrent Tasks on SOBR extent

Post by Vek17 » 1 person likes this post

This is a cut down version of the interactive function I use in my environment.

Code: Select all

function Set-ExtentTaskLimits{
    [CmdletBinding()]
    Param(
        [Veeam.Backup.PowerShell.Infos.VBRScaleOutBackupRepository] $Repository,
    )
    BEGIN{
        if($Repository -eq $null){
            $Repository = $(Get-VBRBackupRepository -ScaleOut | Out-GridView -OutputMode Single -Title "Select SoBR")
        }
    } 
    PROCESS{
        Write-Host "To Exit Type: Done"
        Do{
            $input = Read-Host -Prompt "Update Task Limit (Y)"
            if($input -match '^Y'){
                $SelectedExtents = [Veeam.Backup.Core.CExtendableRepository]::Get($Repository.Id).GetExtents() | Out-GridView -OutputMode Multiple -Title 'Extents to modify'
                do{
                    $Input = $null
                    try{
                        $Input = [uInt32](Read-Host -Prompt "New Task Limit")
                    }catch{
                        Write-Warning 'Please enter a positive integer
                    }
                }while(!$Input)
                foreach($Extent in $SelectedExtents){
                    $Extent.Options.MaxTaskCount = $Input
                    $Extent.SaveOptions()
                }
            }
        }While($Input -notmatch '^Done$')
    }
    END{
    }
}
Post Reply

Who is online

Users browsing this forum: No registered users and 14 guests