Home > Storage > PowerFlex > White Papers > Snapshots Container Storage Modules (CSM) for Dell PowerFlex > Restoring volume group snapshots
To restore the volume group snapshots, PV YAMLs must be created manually for all the associated volumes of the group snapshots:
Steps to restore all the volumes of volume group snapshots are:
$ kubectl describe vgs r01-vgs-mssql01 -n vgs-vxflexos
##Search for Snapshot names##
Snapshots:r01-vgs-mssql01-0-s-mssql01-temp,r01-vgs-mssql01-1-s-mssql01-sqldata,r01-vgs-mssql01-2-s-mssql01-logs
Note: The volume names used under DataSource > name should match the names that appear when describing the volume group snapshot seen under Status > Snapshot Group Name > Snapshots. If the names do not match, the restored PV or PVC will not show data from the source SQL server pod.
$ kubectl apply -f restore_pv_r-mssql01_01 -n vgs-vxflexos
4. To list the PV created run the following command:
kubectl get pv |grep vgs-vxflexos/r-vgs
NAME CAPACITY ACCESS MODES RECLAIM POLICY
k8s-3fa1b6222c 304Gi RWO Delete
k8s-d2ce238530 200Gi RWO Delete
k8s-f6103a962f 304Gi RWO Delete
5. To list the PVCs created to be used my run the following command:
kubectl get pvc -n vgs-vxflexos |grep r-vgs-mssql01
NAME STATUS VOLUME CAPACITY AGE
r-vgs-mssql01-logs Bound k8s-d2ce238530 200Gi 93d
r-vgs-mssql01-sql Bound k8s-3fa1b6222c 304Gi 93d
r-vgs-mssql01-temp Bound k8s-f6103a962f 304Gi 93d
6. To deploy a pod to use the restored PVCs create a YAML file as shown in the Appendix.
7. Run the following command to create a SQL server pod using restored PVCs:
$ kubectl apply -f r-mssql01.yaml -n vgs-vxflexos
8. To list the restored pod run the following command:
kubectl get pods -n vgs-vxflexos
NAME READY STATUS RESTARTS AGE
r-vgs-mssql01-547774b665-q7wgb 1/1 running 1 93d
s-mssql01-658c9444bc-vqq7n 1/1 running 1 89d
Note: The restored container should have a unique label name than the source to avoid cross-data write that might occur on the source container.