Set-VBRBackupRepository. Object reference not set.

PowerShell script exchange

Set-VBRBackupRepository. Object reference not set.

Veeam Logoby cmaier » Sun Mar 06, 2016 6:52 pm

Hi,

I try to limit the maximum concurrent tasks for my repository:
Code: Select all
 Get-VBRBackupRepository -Name 'myRepository' | Set-VBRBackupRepository -LimitConcurrentJobs -MaxConcurrentJobs 6


But it does not work. I get the following error message:
Code: Select all
Set-VBRBackupRepository : Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
At line:1 char:43
+ ... 'vCenter' | Set-VBRBackupRepository -LimitConcurrentJobs -MaxConcurre ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Set-VBRBackupRepository], NullReferenceException
    + FullyQualifiedErrorId : System.NullReferenceException,Veeam.Backup.PowerShell.Command.SetVBRBackupRepository


What does it mean?
cmaier
Influencer
 
Posts: 23
Liked: 1 time
Joined: Mon Feb 24, 2014 4:01 pm
Full Name: Christian Maier

Repository Description

Veeam Logoby Andreas Neufert » Sun Mar 06, 2016 9:35 pm

For me the follwing did the Job:
Code: Select all
Asnp VeeamPSSnapin
$Repository = Get-VBRBackupRepository -name "REP01"
$Repository.Info.Description
$Repository.Info.Description = "Test"
$Repository.SaveOptions()
$Repository


But I was not able to set it with

Code: Select all
Asnp VeeamPSSnapin
$Repository = Get-VBRBackupRepository -name "REP01"
Set-VBRBackupRepository -Repository $Repository  -Description "Test2"


or

Code: Select all
Asnp VeeamPSSnapin
$Repository = Get-VBRBackupRepository -name "REP01"
$Repository | Set-VBRBackupRepository -Description "Twst Powershell"


Any Idea why?
Andreas Neufert
Veeam Software
 
Posts: 2201
Liked: 360 times
Joined: Wed May 04, 2011 8:36 am
Location: Germany
Full Name: @AndyandtheVMs Veeam PM

Re: Repository Description

Veeam Logoby cmaier » Mon Mar 07, 2016 8:44 am

SaveOptions() is a nice workaround for my problem. Thanks :)

However, I'd like to know why Set-VBRBackupRepository does not work as expected, too.
cmaier
Influencer
 
Posts: 23
Liked: 1 time
Joined: Mon Feb 24, 2014 4:01 pm
Full Name: Christian Maier

Re: Limit repository's max concurrent tasks

Veeam Logoby Vitaliy S. » Mon Mar 07, 2016 10:38 am

Hi Christian, please open a support case with our team, as this error message is not expected. Thanks!
Vitaliy S.
Veeam Software
 
Posts: 19564
Liked: 1104 times
Joined: Mon Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov

Re: Repository Description

Veeam Logoby Vitaliy S. » Mon Mar 07, 2016 10:38 am

We will try to reproduce it internally and once we have more info I will update this topic. Thanks!
Vitaliy S.
Veeam Software
 
Posts: 19564
Liked: 1104 times
Joined: Mon Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov

Re: Repository Description

Veeam Logoby Andreas Neufert » Tue Mar 08, 2016 9:47 am

Another workaround is to set another option together with the description:
Code: Select all
Get-VBRBackupRepository -Name Linux | Set-VBRBackupRepository -MaxConcurrentJobs 4 -MountServer (Get-VBRBackupRepository -name Linux).getmounthost($null)

works as well based on feedback from a partner.
Andreas Neufert
Veeam Software
 
Posts: 2201
Liked: 360 times
Joined: Wed May 04, 2011 8:36 am
Location: Germany
Full Name: @AndyandtheVMs Veeam PM

Re: Limit repository's max concurrent tasks

Veeam Logoby v.Eremin » Mon Mar 21, 2016 12:51 pm

Few things to check:

- Whether the backup repository object is returned correctly. If you input just Get-VBRBackupRepository -Name 'myRepository', will the said repository be returned?
- Whether the service account has required permissions. If you right-click on a script and run it as administrator, will the same error be shown?

Thanks.
v.Eremin
Veeam Software
 
Posts: 13281
Liked: 970 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Limit repository's max concurrent tasks

Veeam Logoby cmaier » Tue Mar 22, 2016 1:23 pm

I use the workaround with SaveOptions() decribed here. Thanks
cmaier
Influencer
 
Posts: 23
Liked: 1 time
Joined: Mon Feb 24, 2014 4:01 pm
Full Name: Christian Maier

Re: Repository Description

Veeam Logoby v.Eremin » Wed Mar 23, 2016 2:05 pm

It has been identified as a bug. Both v9 and v9 U1 are affected. As a workaround, you should use either SaveOptions() method or set -EnableVPowerNFS switch each time you try to update repository settings.

Code: Select all
Get-VBRBackupRepository -Name "Name of your repository"| Set-VBRBackupRepository -Description "New Description" -EnableVPowerNFS


Thanks.
v.Eremin
Veeam Software
 
Posts: 13281
Liked: 970 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Set-VBRBackupRepository. Object reference not set.

Veeam Logoby cmaier » Wed Mar 23, 2016 2:56 pm

Thanks, good to know. I can live with the workaround at the moment.
cmaier
Influencer
 
Posts: 23
Liked: 1 time
Joined: Mon Feb 24, 2014 4:01 pm
Full Name: Christian Maier

Re: Set-VBRBackupRepository. Object reference not set.

Veeam Logoby v.Eremin » Wed Mar 23, 2016 3:23 pm

We've spotted it recently, thanks be to your posts, guys, and are planning to address it in Update 2. Thanks.
v.Eremin
Veeam Software
 
Posts: 13281
Liked: 970 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin


Return to PowerShell



Who is online

Users browsing this forum: No registered users and 2 guests