Help to snapshoot HP 3par

PowerShell script exchange

Help to snapshoot HP 3par

Veeam Logoby golivera » Sat Oct 19, 2013 11:58 am

Hello

According to the online help [1] , the command is very simple but I can not make it work, this is the output:

PS C:\Users\veeamadmin> Add-HP3Snapshot -Volume $snapvol -Name "Dell_esx_B_SS_1" -Description "snapshot 1"
Add-HP3Snapshot : Cannot bind parameter 'Volume'. Cannot convert the "System.Linq.Enumerable+WhereA
rrayIterator`1[Veeam.Backup.Core.CSanVolume]" value of type "System.Linq.Enumerable+WhereArrayItera
tor`1[[Veeam.Backup.Core.CSanVolume, Veeam.Backup.Core.Common, Version=7.0.0.0, Culture=neutral, Pu
blicKeyToken=bfd684de2276783a]]" to type "Veeam.Backup.Core.CSanVolume".
At line:1 char:24
+ Add-HP3Snapshot -Volume <<<< $snapvol -Name "Dell_esx_B_SS_1" -Description "snapshot 1"
+ CategoryInfo : InvalidArgument: (:) [Add-HP3Snapshot], ParameterBindingException
+ FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Veeam.Backup.SanPlugin.Hp3PAR.PowerSh
ell.AddHP3Snapshot


[1] http://helpcenter.veeam.com/backup/70/powershell/index.html?add-hp3snapshot.html
golivera
Lurker
 
Posts: 2
Liked: never
Joined: Sat Oct 19, 2013 11:46 am
Full Name: Gustavo Olivera

Re: Help to snapshoot HP 3par

Veeam Logoby nefes » Sun Oct 20, 2013 10:25 am 1 person likes this post

How do you get the value of $snapvol variable?
It seems that it has an incorrect type.
nefes
Veeam Software
 
Posts: 534
Liked: 125 times
Joined: Mon Dec 10, 2012 8:44 am
Full Name: Nikita Efes

Re: Help to snapshoot HP 3par

Veeam Logoby golivera » Sun Oct 20, 2013 1:33 pm

Hi , thanks for the reply.
The variable snapvol the get:

PS C : \ Users \ veeamadmin > $ snapvol = "Dell_esx_B"

But eventually publish with variable with the name of the LUN get the same error

PS C:\Users\veeamadmin> Add-HP3Snapshot -Volume "Dell_esx_B" -Name "Dell_esx_B_SS_1" -Description "snapshot 1"
Add-HP3Snapshot : Cannot bind parameter 'Volume'. Cannot convert the "System.Linq.Enumerable+WhereA
rrayIterator`1[Veeam.Backup.Core.CSanVolume]" value of type "System.Linq.Enumerable+WhereArrayItera
tor`1[[Veeam.Backup.Core.CSanVolume, Veeam.Backup.Core.Common, Version=7.0.0.0, Culture=neutral, Pu
blicKeyToken=bfd684de2276783a]]" to type "Veeam.Backup.Core.CSanVolume".
At line:1 char:24
+ Add-HP3Snapshot -Volume <<<< "Dell_esx_B" -Name "Dell_esx_B_SS_1" -Description "snapshot 1"
+ CategoryInfo : InvalidArgument: (:) [Add-HP3Snapshot], ParameterBindingException
+ FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Veeam.Backup.SanPlugin.Hp3PAR.PowerSh
ell.AddHP3Snapshot
golivera
Lurker
 
Posts: 2
Liked: never
Joined: Sat Oct 19, 2013 11:46 am
Full Name: Gustavo Olivera

Re: Help to snapshoot HP 3par

Veeam Logoby nefes » Mon Oct 21, 2013 7:59 am

Do you have the storage containing this volume in the list of added to Backup console?
If yes, you should get the volume by name like that:
Code: Select all
$snapvol = Get-HP3Volume | where {$_.name -match "Dell_esx_B"}

You could also specify additional parameters if you have several volumes with that name.

If not, you should add it's storage first, either via Backup console or via Powershell commandlet
Code: Select all
Add-HP3Storage
nefes
Veeam Software
 
Posts: 534
Liked: 125 times
Joined: Mon Dec 10, 2012 8:44 am
Full Name: Nikita Efes


Return to PowerShell



Who is online

Users browsing this forum: No registered users and 4 guests