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: (Smiley Happy [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

 

 

2 Solutions

Accepted Solutions
Highlighted
Accepted Solution!

Try this syntax

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

 

View solution in original post

Highlighted
Accepted Solution!

Yes it work now :-) with this

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

View solution in original post

9 Replies
Highlighted

Instead of Get-BEAgentServer,

Instead of Get-BEAgentServer, use Get-BENdmpServer

Highlighted

:-( Thanks VJware for your

:-(

Thanks VJware for your answer, but same result:

 

Add-BEBackupSelection : Cannot bind parameter 'AgentServer'.

 

Highlighted
Accepted Solution!

Try this syntax

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

 

View solution in original post

Highlighted

not working.But answer

not working.But answer different.

 

Add-BEBackupSelection : Cannot bind argument to parameter 'Selection' because i
t is null.
At line:1 char:123
+ New-BEBackupDefinition -BackupJobDefault BackupToDisk | Add-BEBackupSelection
 -AgentServer netapp01.prod.local -Selection <<<<  $y | Save-BEBackupDefinitio
n
    + CategoryInfo          : InvalidData: (Smiley Happy [Add-BEBackupSelection], Parame
   terBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,B
   ackupExec.Management.CLI.Commands.AddBEBackupSelectionCommand

Highlighted

Does it make any difference

Does it make any difference if you use the IP address instead of the name, and as such the cmdlet would be:-

$x=New-BENdmpNetAppServerSelection -Volume "/vol/vol1" -Path "/testfolder" -Recurse:$true

New-BEBackupDefinition -BackupJobDefault BackupToDisk | Add-BEBackupSelection -AgentServer 10.10.10.10 -Selection $x | Save-BEBackupDefinition

And in my earlier example, I erred by using "x" in the first line and then using "y" in the second. Have corrected it now to both "x"

Highlighted
Accepted Solution!

Yes it work now :-) with this

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

View solution in original post

Highlighted

One more things... ;-) Your

One more things... ;-)

Your solution solve the sechelued job, but what about the OneTimeBackup ?

It is compatible with NDMP ?

I should use the Submit-BEOnetimeBackupJob but this time I also have binding problem....

for example : 

Submit-BEOnetimeBackupJob -AgentServer netappsrv01.prod.local -FileSystemSelection "/vol/vol1"

I got : 

Submit-BEOnetimeBackupJob : FileSystemSelection is not a valid parameter for th
e specified agent server type.
At line:1 char:26
+ Submit-BEOnetimeBackupJob <<<<  -AgentServer netappsrv01.prod.local -FileSystem
Selection "/vol/vol1"
    + CategoryInfo          : InvalidArgument: (Smiley Happy [Submit-BEOnetimeBackupJob]
   , InvalidCommandArgumentException
    + FullyQualifiedErrorId : ClientBusinessLogic,BackupExec.Management.CLI.Co
   mmands.SubmitBEOnetimeBackupJobCommand

And if I try to :

$x=New-BENdmpNetAppServerSelection -Volume "/vol/vol1" -Path "/testfolder" -Recurse:$true

Submit-BEOnetimeBackupJob -AgentServer netappsrv01.prod.local -FileSystemSelection $x

I got: 


Submit-BEOnetimeBackupJob : Cannot bind parameter 'FileSystemSelection'. Cannot
 convert the "/*.*" value of type "BackupExec.Management.CLI.BENdmpNetAppServer
Selection" to type "BackupExec.Management.CLI.BEFileSystemSelection".
At line:1 char:81
+ Submit-BEOnetimeBackupJob -AgentServer netappsrv01.prod.local -FileSystemSelect
ion <<<<  $x
    + CategoryInfo          : InvalidArgument: (Smiley Happy [Submit-BEOnetimeBackupJob]
   , ParameterBindingException
    + FullyQualifiedErrorId : CannotConvertArgumentNoMessage,BackupExec.Manage
   ment.CLI.Commands.SubmitBEOnetimeBackupJobCommand

 

 

 

Highlighted

It should work. Try this

It should work. Try this instead:-

Submit-BEOnetimeBackupJob -SelectionList (New-BEBackupSelection  -AgentServer (Get-BEAgentServer NetAppServer) -Selection (New-BENdmpNetAppServerSelection -Volume "/vol/vol1" -Path "/testfolder" -Recurse:$true))

Highlighted

Thanks you VJware, that work

Thanks you VJware, that work fine with the OnetimeBackup command.

 

Thanks for everythings