PowerShell script exchange
Post Reply
Manu80
Service Provider
Posts: 12
Liked: 1 time
Joined: Mar 10, 2020 9:05 pm
Full Name: Manu80
Contact:

Bulk change proxy affinity not work after upgrade to 12.1

Post by Manu80 »

Hello,
I use this script for updating bulk our backup repository to use specific proxy for affinity and work fine without errors or problem before upgrading VBR from version 12.0.0.1420 P20230718 to 12.1.0.21.31.

Code: Select all

$VeeamProxies = Get-VBRViProxy | where { $_.IsDisabled -eq $false}
$repos = Get-VBRBackupRepository | where { $_.IsUnavailable -eq $false }
foreach ($repo in $repos) {
# Set automatic affinity
Set-VBRBackupRepository -AffinityMode Auto -ErrorAction Ignore -Repository $repo

# If repository are Object Storage
if ($repo.IsObjectStorageRepository -eq $true) {
$repositoryCredentials = Get-VBRAmazonAccount | where { $_.id -eq $repo.Credentials.Id }
# Affinity with specific proxy for Object Storage repository
Set-VBRBackupRepository -AffinityMode Manual -AffinityProxy $VeeamProxies -ErrorAction Ignore -Repository $repo -Credentials $repositoryCredentials
} else {
# Affinity with specific proxy for all others repository
Set-VBRBackupRepository -AffinityMode Manual -AffinityProxy $VeeamProxies -ErrorAction Ignore -Repository $repo
}
}
After upgrading to 12.1, this same script give me this error for all backup repository type WasabiS3:

Set-VBRBackupRepository : Repository Wasabi does not support the immutable backups feature.
At line:1 char:1
+ Set-VBRBackupRepository -AffinityMode Auto -Repository $repo
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Set-VBRBackupRepository], Exception
+ FullyQualifiedErrorId : System.Exception,Veeam.Backup.PowerShell.Cmdlets.SetVBRBackupRepository


I not find solution at the moment.
With RestAPI I not find possibility to set affinity to repository.

Has this happened to any of you or do you know how to fix it ?
Thanks in advance
Manu
Mildur
Product Manager
Posts: 8735
Liked: 2294 times
Joined: May 13, 2017 4:51 pm
Full Name: Fabian K.
Location: Switzerland
Contact:

Re: Bulk change proxy affinity not work after upgrade to 12.1

Post by Mildur »

Hi Manu

I get the same message when running the command in my lab.
Let me check with QA if it's a known issue.

Best,
Fabian
Product Management Analyst @ Veeam Software
oleg.feoktistov
Veeam Software
Posts: 1918
Liked: 636 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: Bulk change proxy affinity not work after upgrade to 12.1

Post by oleg.feoktistov »

Hi Manu,

Actually, that's expected as Set-VBRBackupRepository can't really work with object storage repositories. However, at the same time, for set object storage cmdlets we don't have affinity proxy settings, so I noted a feature request for vNext on that.

Question though - how did you manage to set settings for wasabi repo in v12 through Set-VBRBackupRepository? Because in that case the cmdlet requires credentials for object storage, but accepts only CCredentials type. Whereas, object storage creds have their respective classes, which cannot be converted to CCredentials.

Best regards,
Oleg
Manu80
Service Provider
Posts: 12
Liked: 1 time
Joined: Mar 10, 2020 9:05 pm
Full Name: Manu80
Contact:

Re: Bulk change proxy affinity not work after upgrade to 12.1

Post by Manu80 »

Hi Oleg,
thanks.

On v12 I use this:

$repositoryCredentials = Get-VBRAmazonAccount | where { $_.id -eq $repo.Credentials.Id }
Set-VBRBackupRepository -AffinityMode Manual -AffinityProxy $VeeamProxies -ErrorAction Ignore -Repository $repo -Credentials $repositoryCredentials

I use for some object storage repository and works fine without errors.

Manu
oleg.feoktistov
Veeam Software
Posts: 1918
Liked: 636 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: Bulk change proxy affinity not work after upgrade to 12.1

Post by oleg.feoktistov »

Hi Manu,

It shouldn't actually work like that because Set-VBRBackupRepository is not meant for object storage repositories.
I'll ask our technical writers team to add a specific note for Set-VBRBackupRepository. Bug has already been submitted. I also noted your request for affinity rules for object storage cmdlets.

Thanks,
Oleg
Post Reply

Who is online

Users browsing this forum: No registered users and 20 guests