:_mod-docs-content-type: ASSEMBLY
[id="working-with-volume-snapshots-microshift"]
= Working with volume snapshots
include::_attributes/attributes-microshift.adoc[]
:context: volume-snapshots-microshift

toc::[]

[role="_abstract"]
{microshift-short} administrators can use volume snapshots to help protect against data loss by using the supported {microshift-short} logical volume manager storage (LVMS) Container Storage Interface (CSI) provider. Familiarity with persistent volumes is required.

A snapshot represents the state of the storage volume in a node at a particular point in time. Volume snapshots can also be used to provision new volumes. Snapshots are created as read-only logical volumes (LVs) located on the same device as the original data.

A {microshift-short} administrator can complete the following tasks using CSI volume snapshots:

* Create a snapshot of an existing persistent volume claim (PVC).
* Back up a volume snapshot to a secure location.
* Restore a volume snapshot as a different PVC.
* Delete an existing volume snapshot.

[IMPORTANT]
====
Only the logical volume manager storage (LVMS) plugin CSI driver is supported by {microshift-short}.
====

[role="_additional-resources"]
.Additional resources

* xref:../microshift_storage/using-persistent-storage-microshift.adoc#persistent-volumes_using-persistent-storage-microshift[Using persistent volumes]

* link:https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/9/html/configuring_and_managing_logical_volumes/managing-lvm-volume-groups_configuring-and-managing-logical-volumes[Managing LVM volume groups]

* link:https://access.redhat.com/documentation/en-us/openshift_container_platform/{ocp-version}/html/storage/using-container-storage-interface-csi#persistent-storage-csi-snapshots[CSI snapshots: `VolumeSnapshot` APIs]

* link:https://docs.openshift.com/container-platform/{ocp-version}/rest_api/storage_apis/volumesnapshot-snapshot-storage-k8s-io-v1.html[VolumeSnapshot API specification]

include::modules/microshift-lvm-thin-volumes.adoc[leveloffset=+1]

[role="_additional-resources"]
.Additional resources

* link:https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/9/html/configuring_and_managing_logical_volumes/basic-logical-volume-management_configuring-and-managing-logical-volumes#creating-thin-logical-volume_creating-logical-volumes[Creating a thin logical volume]

* link:https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/configuring_and_managing_logical_volumes/creating-and-managing-thin-provisioned-volumes_configuring-and-managing-logical-volumes[Configuring and managing thin provisioned volumes]

* xref:../microshift_storage/volume-snapshots-microshift.adoc#microshift-storage-classes_volume-snapshots-microshift[Storage classes]

* xref:../microshift_storage/microshift-storage-plugin-overview.adoc#microshift-storage-device-classes_microshift-storage-plugin-overview[Storage device classes]

include::modules/microshift-storage-classes.adoc[leveloffset=+2]

[role="_additional-resources"]
.Additional resources

* link:https://docs.redhat.com/en/documentation/openshift_container_platform/{ocp-version}/html/storage/dynamic-provisioning#defining-storage-classes_dynamic-provisioning[Defining storage classes]

* xref:../microshift_storage/microshift-storage-plugin-overview.adoc#microshift-storage-device-classes_microshift-storage-plugin-overview[Storage device classes]

include::modules/microshift-storage-vol-snapshot-class.adoc[leveloffset=+1]

[role="_additional-resources"]
.Additional resources

* link:https://docs.redhat.com/en/documentation/openshift_container_platform/{ocp-version}/html/storage/using-container-storage-interface-csi#persistent-storage-csi-snapshots-overview_persistent-storage-csi-snapshots[OpenShift CSI volume snapshots]

include::modules/microshift-storage-about-vol-snapshots.adoc[leveloffset=+1]

include::modules/microshift-storage-creating-vol-snapshot.adoc[leveloffset=+2]

include::modules/microshift-storage-backup-volume-snapshots.adoc[leveloffset=+2]

include::modules/microshift-storage-vol-snapshot-restore.adoc[leveloffset=+2]

[role="_additional-resources"]
.Additional resources

* link:https://docs.redhat.com/en/documentation/openshift_container_platform/{ocp-version}/html/storage/using-container-storage-interface-csi#persistent-storage-csi-snapshots-restore_persistent-storage-csi-snapshots[Restoring a volume snapshot]

include::modules/persistent-storage-csi-snapshots-delete.adoc[leveloffset=+2]

include::modules/microshift-storage-volume-cloning.adoc[leveloffset=+1]

[role="_additional-resources"]
.Additional resources

* link:https://docs.redhat.com/en/documentation/openshift_container_platform/{ocp-version}/html/storage/using-container-storage-interface-csi#persistent-storage-csi-cloning[CSI volume cloning]

* xref:../microshift_storage/volume-snapshots-microshift.adoc#microshift-lvm-thin-volumes_volume-snapshots-microshift[About LVM thin volumes]
