BE2014 + NDMP + Powershell
Hi,
I would like to use the new feature in BackupExec 2014 for using Powershell and NDMP.
I follow the example avalaible in the Help as follow:
C:\PS> $x = New-BENdmpNetAppServerSelection -Volume "/vol/vol1" -Path "/testfolder" -Recurse:$true
C:\PS> Get-BEAgentServer "NetAppServer" | New-BEBackupDefinition -BackupJobDefault BackupToDisk | Add-BEBackupSelection $x | Save-BEBackupDefinition
(of course I replace "NetappServer" with my Netapp server name that can I also see via Get-BEAgentServer)
The error result is :
Add-BEBackupSelection : Cannot bind parameter 'AgentServer'. Cannot convert the
"/testfolder/*.*" value of type "BackupExec.Management.CLI.BENdmpNetAppServerS
election" to type "BackupExec.Management.CLI.BEAgentServer".
At line:1 char:121
+ Get-BEAgentServer "myservername" | New-BEBackupDefinition -BackupJobD
efault BackupToDisk | Add-BEBackupSelection <<<< $x | Save-BEBackupDefinition
+ CategoryInfo : InvalidArgument: (:) [Add-BEBackupSelection], Pa
rameterBindingException
+ FullyQualifiedErrorId : CannotConvertArgumentNoMessage,BackupExec.Manage
ment.CLI.Commands.AddBEBackupSelectionCommand
Why the bind don't pass ?
I notice that for other selection type (vmware, sql, exchnage etc...) they pass in the "New-BEBackupDefinition" command an option related to the seltion type (like -VMwareSelection , -ExchangeDatabaseSelection or -OracleSeleciton) but no kind of -NDMPselection.
Somethings is missing or I miss somehtings ???
Someone can help me ?
Yann
Try this syntax instead:-
$x=New-BENdmpNetAppServerSelection -Volume "/vol/vol1" -Path "/testfolder" -Recurse:$true
New-BEBackupDefinition -BackupJobDefault BackupToDisk | Add-BEBackupSelection -AgentServer NetAppServer -Selection $y | Save-BEBackupDefinition
Yes it work now :-)
with this correct commande:
$x=New-BENdmpNetAppServerSelection -Volume "/vol/vol1" -Path "/testfolder" -Recurse:$true
New-BEBackupDefinition -BackupJobDefault BackupToDisk | Add-BEBackupSelection -AgentServer NetAppServer -Selection $x | Save-BEBackupDefinition
(the X not the Y, you was right we miss it ;- and with dns name it works no need to use IP)
Can you tell your collegue that they have to correct the help file ?
Anyway thanks for your help, very usefull.
Best Regards
Yann