Copying Snapshots to Volumes

Microsoft Platform Guide

Audience
Public
Source Type
Documentation

In the SDK version 2.x, the process to create a volume (Copy Volume) from a snapshot requires a Reference Object be created to identify the snapshot. This section includes information on how to create volumes from volume snapshots, Host Group snapshots, and Protection Group snapshots.

Host Volumes

The process of creating a Reference Object for a snapshot is similar across the use cases. Obtain the snapshot information, set the Reference Object, and execute against that object. The New-Pfa2ReferenceObject cmdlet is used to set a variable for the snapshot object. When creating a Reference Object use either the -Id or -Name but not both. Examples shown below.

Using -Id parameter.


# Retrieve the snapshot information
# This will retrieve the ID of the snapshot
PS >Get-Pfa2VolumeSnapshot -Array $FlashArray -Name 'DEMO-VOL1.TEST' | Format-Table -Property ID
# Create the reference object fot the snapshot and set the variable
PS >$src = New-Pfa2ReferenceObject -Id <returned snapshot ID>

Using -Name parameter.


# Retrieve the snapshot information
# This will retrieve the Name of the snapshot
PS >Get-Pfa2VolumeSnapshot -Array $FlashArray -Name 'DEMO-VOL1.TEST' | Format-Table -Property Name
# Create the reference object fot the snapshot and set the variable
PS >$src = New-Pfa2ReferenceObject -Name <returned snapshot Name>

Now that the $src variable has been set with either the -Id or -Name parameter with the Reference Object of the snapshot, we can create a volume using the New-Pfa2Volume cmdlet as shown.


PS >New-Pfa2Volume -Array $FlashArray -Name volumecopy -Source $src