Below is an example using the PowerShell SDK . The below has also been added to the new Microsoft Platform GuidePowerShell section.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
# Connect to FA $f = New-PfaArray -EndPoint 10.0.0.1 -Credentials (Get-Credential) -IgnoreCertificateError # Get all the snapshotted volumes, this will include PGroups. Get-PfaAllVolumeSnapshots -Array $f | ft -a # Get a specific pgroup snapshot. Name of snapshot is FLASHARRAYNAME:PGROUPNAME_SNAPSHOT_NAME $PgroupSnapSource = Get-PfaVolumeSnapshots -Array $f -volumename ‘solutions-lab-bfs-405-c09-20:z-nightly-replica-to-PureTEC.157.arvnd-Boot-Lun-05’ # Create a new volume from the source. New-PfaVolume -Array $f -Source $PgroupSnapSource.name -VolumeName ‘barkz-test’ # Validate the volume has been created. Get-PfaVolume -Array $f -Name ‘barkz-test’ |
Output example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
source serial created name size ——— ——— ———– —— —— Mark-sql-dev-SQL-Data-Log 73E940225A2A52BB0002CA81 2016-08-03T00:50:56Z Mark-sql-dev-SQL-Data-Log.Mark-sql-dev-SQL-Data-Log 1099511627776 Mark-sql-dev-SQL-System 73E940225A2A52BB0002CA82 2016-08-03T00:51:15Z Mark-sql-dev-SQL-System.Mark-sql-dev-SQL-System 214748364800 Mark-sql-dev-SQL-Temp 73E940225A2A52BB0002CA83 2016-08-03T00:51:34Z Mark-sql-dev-SQL-Temp.Mark-sql-dev-SQL-Temp 536870912000 old-Mark-Bootlun-03-2016TP5 73E940225A2A52BB0002CEEF 2016-08-04T23:47:25Z old-Mark-Bootlun-03-2016TP5.Mark-Bootlun-Rep 161061273600 old-Mark-Bootlun-04-2016tp5 73E940225A2A52BB0002CEF0 2016-08-04T23:47:25Z old-Mark-Bootlun-04-2016tp5.Mark-Bootlun-Rep 161061273600 .......LOTS OF SNAPSHOTS...... Barkz-Bootlun-03-WS2016-DC-GUI-3 73E940225A2A52BB0003D19D 2017-10-19T17:39:00Z z-nightly-replica-to-PureTEC.157.Barkz-Bootlun-03-WS2016-DC-GUI-3 161061273600 Barkz-Bootlun-04-WS2016-DC-GUI-4 73E940225A2A52BB0003D19E 2017-10-19T17:39:00Z z-nightly-replica-to-PureTEC.157.Barkz-Bootlun-04-WS2016-DC-GUI-4 161061273600 Barkz-Bootlun-02-WS2016-DC-GUI-2 73E940225A2A52BB0003D19F 2017-10-19T17:39:00Z z-nightly-replica-to-PureTEC.157.Barkz-Bootlun-02-WS2016-DC-GUI-2 161061273600 Barkz-Bootlun-05-WS2016-DC-GUI-5 73E940225A2A52BB0003D1A0 2017-10-19T17:39:00Z z-nightly-replica-to-PureTEC.157.Barkz-Bootlun-05-WS2016-DC-GUI-5 161061273600 TBL-CH6-Somu-SVR05-BootLun-OEL 73E940225A2A52BB0003D19A 2017-10-19T17:39:00Z z-nightly-replica-to-PureTEC.157.TBL-CH6-Somu-SVR05-BootLun-OEL 107374182400 TBL-CH6-Somu-SRV02-BootLun-RHEL 73E940225A2A52BB0003D19B 2017-10-19T17:39:00Z z-nightly-replica-to-PureTEC.157.TBL-CH6-Somu-SRV02-BootLun-RHEL 107374182400 arvnd-Boot-Lun-05 73E940225A2A52BB0003D19C 2017-10-19T17:39:00Z z-nightly-replica-to-PureTEC.157.arvnd-Boot-Lun-05 75161927680 TBL-BootLun-CH6-SRV06-OEL 73E940225A2A52BB0003D1A4 2017-10-19T17:39:00Z z-nightly-replica-to-PureTEC.157.TBL-BootLun-CH6-SRV06-OEL 107374182400 CH3-Mark-Linux-Svr6-Bootlun 73E940225A2A52BB0003D1A5 2017-10-19T23:38:19Z CH3-Mark-Linux-Svr6-Bootlun.CH3-Mark-Linux-Svr6-Bootlun-Snap-Base 322122547200 source : arvnd-Boot-Lun-05 serial : 73E940225A2A52BB0003D1A7 created : 2017-10-19T17:39:00Z name : barkz-test2 size : 75161927680 name : barkz-test2 created : 2017-10-19T17:39:00Z source : arvnd-Boot-Lun-05 time_remaining : serial : 73E940225A2A52BB0003D1A7 size : 75161927680 |
Hope that helps,
Barkz