PowerShell script exchange
Post Reply
mog54
Influencer
Posts: 20
Liked: 1 time
Joined: May 28, 2018 10:30 pm
Location: France
Contact:

Change nfs gateway repository powershell

Post by mog54 »

Hello,

i try to change the gateway of an nfs4 repository trough powershell but i feel like i missing something :(

When i get my repo, i got this
Image

i try to switch with this commands

Code: Select all

Set-VBRBackupRepository -Repository "S'Cloud Repo" -Server "198.18.10.2"
Set-VBRBackupRepository -Repository "S'Cloud Repo" -Server "HOSTID"
And both return me error.

Thanks
david.domask
Veeam Software
Posts: 1264
Liked: 328 times
Joined: Jun 28, 2016 12:12 pm
Contact:

Re: Change nfs gateway repository powershell

Post by david.domask »

Hi mog54,

Can you share the full error from the powershell console? Looks like it got missed.

I have a guess though on the issue, as looks like you're passing a string (e.g., 192.18.10.2) to the -Server flag when it needs to be a CHost object returned from Get-VBRServer.

https://helpcenter.veeam.com/docs/backu ... ml?ver=120
Server
Specifies an array of hosts where the backup repositories are located. The cmdlet will set this host as a backup repository.

Note: You can not set a new backup repository for the following types of hosts that have been added as backup repositories:
WinLocal
LinuxLocal
Accepts the CHost[] object. To get this object, run the Get-VBRServer cmdlet.
So try something like:

$gServer = Get-VBRServer -name "name of your server"

Then pass $gServer to the -Server flag.
David Domask | Product Management: Principal Analyst
mog54
Influencer
Posts: 20
Liked: 1 time
Joined: May 28, 2018 10:30 pm
Location: France
Contact:

Re: Change nfs gateway repository powershell

Post by mog54 »

Hello,

Thank you for your answer, i still got an error Image

Have a nice day
david.domask
Veeam Software
Posts: 1264
Liked: 328 times
Joined: Jun 28, 2016 12:12 pm
Contact:

Re: Change nfs gateway repository powershell

Post by david.domask »

Thanks for the screenshot of the error and you're welcome for the help so far.

Can I ask, is 192.18.10.2 a Windows or Linux server in your environment? Can you manually set that server as a gateway for this NFS repository in the UI?

I'm seeing similar behavior in my testing, so I advise open a support case after reproducing the issue. Note the date and time of your reproduction, and then be sure to include logs for Support by using the 3rd radio option and selecting the Veeam Backup and Replication server itself to export logs from.
David Domask | Product Management: Principal Analyst
mog54
Influencer
Posts: 20
Liked: 1 time
Joined: May 28, 2018 10:30 pm
Location: France
Contact:

Re: Change nfs gateway repository powershell

Post by mog54 »

Hello,

it is an hyper host, and yes i can set it via GUI as gateway for the nfs repository

Thanks
david.domask
Veeam Software
Posts: 1264
Liked: 328 times
Joined: Jun 28, 2016 12:12 pm
Contact:

Re: Change nfs gateway repository powershell

Post by david.domask »

Got it, I would open a support case then as prescribed and let's have Support take a look, not sure why it's not happy about this parameter.
David Domask | Product Management: Principal Analyst
479er
Lurker
Posts: 1
Liked: never
Joined: Apr 25, 2024 12:01 pm
Contact:

Re: Change nfs gateway repository powershell

Post by 479er »

Hey everyone,

@mog54 Were you able to find a solution to this problem? I'm experiencing the exact same issue.
david.domask
Veeam Software
Posts: 1264
Liked: 328 times
Joined: Jun 28, 2016 12:12 pm
Contact:

Re: Change nfs gateway repository powershell

Post by david.domask »

Hi 479er,

The previous poster hasn't shared a case number yet so not sure on the progress, but I advise [url=post517439.html#p517439]follow the instructions here and please open a Support case after reproducing the issue. Please share the case number once you've created it.
David Domask | Product Management: Principal Analyst
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests