PowerShell script exchange
Post Reply
uk1984
Service Provider
Posts: 53
Liked: 4 times
Joined: Dec 04, 2023 10:00 am
Full Name: Udo Kloos
Contact:

un-/assign Gateway server from/to Backup Repositories

Post by uk1984 »

We have many repositories (NFS) and many Gateway servers (SLES15).

And we are looking for a solution where we can un-assign certain Gateway servers basically from all or certain Backup Repositories
and then re-assign them again after some hours.

Reason:
The SLES15 Gateway servers need to be patched at least once a month by our linux team and at the end they will also do
a reboot of the servers. And when the Gateways Servers are still being used by VBR (in jobs) we will get errors which
we want to avoid.
Sadly for the Gateway Servers there is no "global" option to disable them, like it is the case with for the proxies...
(I hope with V13 we will also be able to "disable" certain Gateway server globally)

So we a "maintenance plan" where we did split everthing to 3 days.
Then we can assure that still enough GW servers at a time are present for our workloads.

So normally almost "all" gateway servers are assigned to almost all NFS repositories.

Patchday1:
unassign 2 gw servers, like 2 hours before patching
patching
reassign the pacthed 2 gw servers

Patchday2:
unassign 2 other gw servers, like 2 hours before patching
patching
reassign the pacthed 2 gw servers

Patchday3:
unassign 2 other gw servers, like 2 hours before patching
patching
reassign the pacthed 2 gw servers

Best Regards
david.domask
Veeam Software
Posts: 3016
Liked: 700 times
Joined: Jun 28, 2016 12:12 pm
Contact:

Re: un-/assign Gateway server from/to Backup Repositories

Post by david.domask »

Hi uk1984,

Use Set-VBRBackupRepository with the -Server parameter.

Populate an array in advance with the desired gateway servers (fetch them using Get-VBRServer), then pass that array to the -Server parameter. You'd simply exclude the server that's undergoing maintenance from the array.

Quick example:

Code: Select all

$server = @()
$server += Get-VBRServer -Name 'Example1'
$server += Get-VBRServer -Name 'Example2'
$repo = Get-VBRBackupRepository -Name "nfs"
Set-VBRBackupRepository -Repository $repo -AutoSelectGateway:$false -Server $server

#removing gateway server Example1 from gateway list

$server = @()
$server += Get-VBRServer -Name 'Example2'
Set-VBRBackupRepository -Repository $repo -AutoSelectGateway:$false -Server $server
David Domask | Product Management: Principal Analyst
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests