image_pdfimage_print

Whenever a snapshot is created, the individual objects in the protection group are snapped together to create a point-in-time consistency group called a protection group snapshot. FlashRecover protection groups can be defined and managed from the Pure Storage GUI, CLI and Windows PowerShell. Protection groups are required for scheduling snapshots to occur locally or for snapshot to be replicated.

Microsoft SQL Server is a typical candidate for using a protection group as there may be many databases spread across multiple volumes, hosts or host groups. When defining the protection group and local policy a schedule can be created that includes how often to create a snapshot and length of retention.

https://blog.purestorage.com/purely-technical/updated-restoring-protection-group-volume-snapshots/

Protection group snapshots allow you to recover volumes on the local array, for recovering from corruption or user error, or for creating clones for test & development. Protection group snapshots that are replicated to a target array can be used to recover from a disaster or can be cloned for creating dev/test instances on a secondary array.

One challenge when working with protection group snapshots is that each volume in the protection group must be recovered or cloned in order to recover the whole protection group. I’ve implemented a new cmdlet that allows you to easily recover all the volumes in a protection group snapshot in one single operation.

In this example I’ll use a protection group snapshot replicated from source array cs-perf-pure-02 with 6 members which are all volumes.

For discussion purposes lets suppose that the above schedule has been executing and has created 2 snapshots.

These 2 snapshots each contain a consistency group of the 6 members (volumes).

Restoring each of the members of the snapshot requires that each individual snapshot be copied to a new volume that can then be attached to a host or host group.

Snapshots

If we think about this situation and relate it to a disaster recovery scenario every second of downtime is crucial and this process would need further automation to support the business requirements. Thinking back to the example scenario of using Microsoft SQL Server we know that we are dealing with a Windows Server environment. With Windows we can take advantage of Pure Storage PowerShell Toolkit to automate this process and recover all of the volumes from this protection group snapshot in one operation.

Note: An important point to note about the above PowerShell is that the calling cmdlet at the bottom of the example script assumes that there is an established Session created (eg. $FASession).

I implemented by creating the Restore-PfaProtectionGroupVolumeSnapshots function which uses other toolkit cmdlets (Get-PfaProtectionGroup and New-PfaVolume). After running the function with the parameters ProtectionGroup, VolumeSnapshots, Prefix and Session each of the individual volume snapshots have been restored.

Snapshots

This new function is now part of the updated release of the Pure Storage PowerShell Toolkit v2.2.1.302. The toolkit can be downloaded from Github.

If you want this feature ping me @barkz on twitter.

Thanks,
Barkz