Create Volume Snapshots
This section describes how to create a volume snapshot.
A volume snapshot saves the current data of a storage volume, which can be used to create a persistent volume claim and the corresponding persistent volume.
Prerequisites
KubeSphere Storage should have been installed and enabled.
You should join a cluster or a project and have the Volume Snapshots Management permission within the cluster or the project. For more information, refer to "Cluster Roles" and "Project Roles".
Ensure that the system has created a Persistent Volume for the Persistent Volume Claim.
Ensure that the backend storage system supports volume snapshot functionality and that volume snapshot creation is enabled on the storage class corresponding to the persistent volume claim. Operation method: Storage Class > More > Set Volume Operations > Enable Volume Snapshot Creation.
Method 1: Volume Snapshots > Create Volume Snapshot
In the cluster, you can directly create a volume snapshot for a persistent volume claim under the Volume Snapshots menu.
Log in to the KubeSphere web console with a user who has the Volume Snapshots Management permission, and access your cluster.
Click Storage > Volume Snapshots in the left navigation pane.
Click Create on the page.
In the Create Snapshot dialog, set the persistent volume claim for which to create a snapshot, the name of the volume snapshot, and the volume snapshot class, then click OK.
Parameter Description Persistent Volume Claim
The persistent volume claim for which to create a snapshot.
Name
The name of the volume snapshot. The name can only contain lowercase letters, numbers, and hyphens (-), must start and end with a lowercase letter or number, and can be up to 253 characters long.
Volume Snapshot Class
The volume snapshot class used to create the volume snapshot. Ensure that the provider of the volume snapshot class matches the provider of the storage class corresponding to the persistent volume; otherwise, the volume snapshot creation will fail.
After the volume snapshot is created, it will be displayed in the volume snapshot list.
Method 2: Persistent Volume Claims > Create Volume Snapshot
In the cluster or project, you can create a volume snapshot for a persistent volume claim under the Persistent Volume Claims menu.
Log in to the KubeSphere web console with a user who has the Persistent Volume Claim Management permission and the Volume Snapshots Management permission, and enter your cluster or project.
Select Storage > Persistent Volume Claims in the left navigation pane.
Click the name of a persistent volume claim in the persistent volume claim list to open its details page.
In the upper-left corner of the details page, select More > Create Snapshot.
In the Create Snapshot dialog, set the name of the volume snapshot and the volume snapshot class, then click OK.
Parameter Description Name
The name of the volume snapshot. The name can only contain lowercase letters, numbers, and hyphens (-), must start and end with a lowercase letter or number, and can be up to 253 characters long.
Volume Snapshot Class
The volume snapshot class used to create the volume snapshot. Ensure that the provider of the volume snapshot class matches the provider of the storage class corresponding to the persistent volume; otherwise, the volume snapshot creation will fail.
After the volume snapshot is created, it will be displayed in the volume snapshot list on the Volume Snapshots page.
Feedback
Was this page Helpful?
Receive the latest news, articles and updates from KubeSphere
Thanks for the feedback. If you have a specific question about how to use KubeSphere, ask it on Slack. Open an issue in the GitHub repo if you want to report a problem or suggest an improvement.