It doesn't look like I can edit my post. I wanted to be a bit more specific on what the problem here is. I believe this problem is specifically around the use of the 'New-VBRNASBackupJobObject' cmdlet.
When I configure a backup job that contains NAS Filer shares in the GUI. For example, say I add the following two SMB shares:
Code: Select all
\\netapp01-nas\share1
\\netapp01-nas\share2
Afterwards, I can query the backup objects in powershell:
Code: Select all
(Get-VBRUnstructuredBackupJob -name test-job).BackupObject
Server InclusionMask ExclusionMask Path
------ ------------- ------------- ----
Veeam.Backup.PowerShell.Infos.VBRSANNASSMBServer {} {\.snapshot, \~snapshot} netapp01\netapp01-nas\vol1\share1:SanSmb
Veeam.Backup.PowerShell.Infos.VBRSANNASSMBServer {} {\.snapshot, \~snapshot} netapp01\netapp01-nas\vol1\share2:SanSmb
Note that the Path contains a fully qualified reference to the NAS Filer, the SVM, and the actual Volume/Path where the share resides (/vol1/share1).
If I take a look at the Server object for one of the above items, I see something like this:
Code: Select all
(Get-VBRUnstructuredBackupJob -name test-job).BackupObject[0].Server
AccessCredentials : veeam
ProxyMode : SelectedProxy
SelectedProxyServers : {fe5fe9d9-9329-4bf0-80cf-1c698c6a94cc}
EnableSnapDiff : True
InheritSettingsFromFiler : True
Type : SANSMB
BackupIOControlLevel : High
Id : 9e1faaf9-615e-4e58-bd01-a7cf4b91449e
CacheRepository : Veeam.Backup.Core.CBackupRepository
Now, let's say I create a new NAS filer job from Powershell using the objects from the original job:
Code: Select all
$job = Get-VBRUnstrucuteredBackupJob -name test-job
Add-VBRNASBackupJob -BackupObject $job.BackupObject -Name test-job2 -ShortTermBackupRepository $job.ShortTermBackupRepository
(Get-VBRUnstructuredBackupJob -name test-job2).BackupObject
Server InclusionMask ExclusionMask Path
------ ------------- ------------- ----
Veeam.Backup.PowerShell.Infos.VBRSANNASSMBServer {} {\.snapshot, \~snapshot} netapp01\netapp01-nas\vol1\share1:SanSmb
Veeam.Backup.PowerShell.Infos.VBRSANNASSMBServer {} {\.snapshot, \~snapshot} netapp01\netapp01-nas\vol1\share2:SanSmb
Perfect. The Path is what I'm looking for. But, let's say I don't have these original objects to copy from. Following the Veeam documentation, I'm supposed to use the 'New-VBRNASBackupJobObject' cmdlet to create it.
Code: Select all
New-VBRNASBackupJobObject -Server (Get-VBRUnstructuredServer -id ($job.BackupObject[0].Server.Id))
Server InclusionMask ExclusionMask Path
------ ------------- ------------- ----
Veeam.Backup.PowerShell.Infos.VBRSANNASSMBServer {} {\.snapshot, \~snapshot} \\172.16.8.52\share1
No Bueno! Notice the Path has been translated into an IP address and share name instead of a fully qualified reference to the NAS Filer.
We're clearly working with the same share though:
Code: Select all
(New-VBRNASBackupJobObject -Server (Get-VBRUnstructuredServer -id ($job.BackupObject[0].Server.Id))).Server
AccessCredentials : veeam
ProxyMode : SelectedProxy
SelectedProxyServers : {fe5fe9d9-9329-4bf0-80cf-1c698c6a94cc}
EnableSnapDiff : True
InheritSettingsFromFiler : True
Type : SANSMB
BackupIOControlLevel : High
Id : 9e1faaf9-615e-4e58-bd01-a7cf4b91449e
CacheRepository : Veeam.Backup.Core.CBackupRepository
The next logical thing is to try something like this:
Code: Select all
New-VBRNASBackupJobObject -Server (Get-VBRUnstructuredServer -id ($job.BackupObject[0].Server.Id)) -Path netapp01\netapp01-nas\vol1\share1:SanSmb
New-VBRNASBackupJobObject : Remove Path parameter.
Parameter name: Path
At line:1 char:1
+ New-VBRNASBackupJobObject -Server (Get-VBRUnstructuredServer -id ($jo ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [New-VBRNASBackupJobObject], ArgumentException
+ FullyQualifiedErrorId : System.ArgumentException,Veeam.Backup.PowerShell.Cmdlets.NewVBRNASBackupJobObject
No Bueno! No combination of -Server and -Path seems acceptable. It will not let me use the two together even though it is clearly a supported combination through documentation and independent review of the command.
So, let's apply the backup object I do get to the job:
Code: Select all
(Get-VBRUnstructuredBackupJob -Name test-job2 | Set-VBRNASBackupJob -BackupObject (New-VBRNASBackupJobObject -Server (Get-VBRUnstructuredServer -id ($job.BackupObject[0].Server.Id)))).BackupObject
Server InclusionMask ExclusionMask Path
------ ------------- ------------- ----
Veeam.Backup.PowerShell.Infos.VBRSANNASSMBServer {} {\.snapshot, \~snapshot} \\172.16.8.52\share1
Again, no surprise, but the translated Path flows through to the job as well.
So, the question becomes, HOW do I create the backup objects that the GUI is clearly adding?
This has a trickle down effect that if I look at the disk storage (in the GUI) after one of the backup jobs runs, it also shows the object like '\\172.16.8.52\share1' whereas all the jobs added through the GUI show the fully qualified NAS filer object.