I have a NAS_To_Tape job to backup NetApp Fileshares to Tape.
When I edit the job in the GUI, after selecting the SMB host(NetApp SVM), I can select all SMB shares and add them as a source.
Since there are more than 100 shares and they keep changing, I would like to automate this.
Problem, the objects are created with the Veeam Powershell as “Host” and not as “Directory”.
For example:
After adding source in GUI
Code: Select all
(Get-VBRTapeJob -name "NAS_Test").object
IncludeMask : *.*
ExcludeMask :
Path : \\filer\share
SelectionType : Directory
Server : \\fileserver(ID)
Code: Select all
$NASServer = Get-VBRUnstructuredServer -ID <ID>
$Job = Get-VBRTapeJob -Name 'NAS_Test'
$Volumes = @(Get-ChildItem -Path '\\fileserver\c$' )
$NASVolumes = @()
foreach ($vol in $Volumes){
$volname = $vol.name
$volpath = '\\fileserver\c$\' + $volname
$NASVolumes += New-VBRFileToTapeObject -IncludeMask "*.*" -ExcludeMask "*.snapshot;~snapshot" -Path $volpath -NASServer $NASServer
}
Set-VBRFileToTapeJob -Job $Job -Object $NASVolumes
Code: Select all
(Get-VBRTapeJob -name "NAS_Test").object
IncludeMask : *.*
ExcludeMask :
Path : \\filer\share
SelectionType : Host
Server : \\fileserver(ID)
Does anyone else have this problem or could I solve it in another way?
Many thanks