Volume Restore from Snapshot
Last updated
Was this helpful?
Last updated
Was this helpful?
This website/page will be End-of-life (EOL) after 31 August 2024. We recommend you to visit for the latest Mayastor documentation (v2.6 and above).
Mayastor is now also referred to as OpenEBS Replicated PV Mayastor.
Volume restore from an existing snapshot will create an exact replica of a storage volume captured at a specific point in time. They serve as an essential tool for data protection, recovery, and efficient management in Kubernetes environments. This article provides a step-by-step guide on how to create a volume restore.
To begin, you'll need to create a StorageClass that defines the properties of the snapshot to be restored. Refer to for more details. Use the following command to create the StorageClass:
Note the name of the StorageClass, which, in this example, is mayastor-1-restore.
Note the snapshot's name, for example, pvc-snap-1.
After creating a snapshot, you can create a PersistentVolumeClaim (PVC) from it to generate the volume restore. Use the following command:
By running this command, you create a new PVC named restore-pvc
based on the specified snapshot. The restored volume will have the same data and configuration as the original volume had at the time of the snapshot.
You need to create a volume snapshot before proceeding with the restore. Follow the steps outlined in to create a volume snapshot.