Forum Discussion

quilleo's avatar
quilleo
Novice I
2 years ago

Anyone know how to clone a protection group snapshot

Anyone know how to clone a protection group snapshot to a volume using PureStoragePowerShellSDK2? The only example I saw was using one of the reference cmdlets which appear to have been removed from the latest versions. The help for New-Pfa2Volume implies there may be a SourceId and SourceName paramters for API >= 2.3 (my arrays show api versions 2.25 and 2.17) nor do I see an example on how to use these. Thanks!
  • Can answer better Monday, but if you run a get-help on the cmdlet it should show available parameters… -examples should give examples (not sure if copying a snapshot is one)
  • It is not one of the examples but I will do some trial and error and reply if I figure it out. Thx!
  • From what I can do on mobile, I am seeing an example of. Basically in sdk2 it’s expecting an object not a string. $VolName = "myvolume.snapsuffix" $src = New-Pfa2ReferenceObject -Name $VolName New-Pfa2Volume -Array $FlashArray -Name $NewVol -Source $src
  • So, you could get the result of a get snapshot and pass that in as well
  • Yeah. I think I figured it out. I was starting with an object from Get-Pfa2ProtectionGroupSnapshot which wasn't working as the source reference but I got the id from Get-Pfa2VolumeSnapshot filtering on the snapshot name from the pgsnapshot and was able to create a volume. Thanks for the hint. Would be good to add an example to the help for New-Pfa2Volume