Using Volume Snapshots

A volume snapshot is a point-in-time copy of a persistent volume claim (PVC) that can be used to configure new persistent volume claims (pre-filling with snapshot data) or to roll back existing persistent volume claims to a previous state, achieving the effect of backing up application data and restoring it as needed, thereby ensuring the reliability of application data.

Prerequisites

  • The administrator has deployed the volume snapshot component Snapshot Controller for the current cluster and enabled snapshot-related features in the storage cluster.

  • The persistent volume claim must be created dynamically and its status must be Bound.

  • The storage class bound to the persistent volume claim must support snapshot functionality, such as CephRBD Built-in Storage, CephFS Built-in Storage, or TopoLVM.

Creating Volume Snapshots

Creating a Volume Snapshot Based on a Specified Persistent Volume Claim (PVC)

Method One

  1. Enter the Container Platform.

  2. In the left navigation bar, click Storage > Persistent Volume Claims (PVC).

  3. Click the ⋮ next to the corresponding persistent volume claim in the list and select Create Volume Snapshot.

  4. Fill in the snapshot description. This description can help you record the current state of the persistent volume, such as Before Application Upgrade.

  5. Click Create. The time taken for the snapshot depends on network conditions and data volume; please be patient.

    When the snapshot changes to Available status, it indicates that the creation was successful.

Method Two

  1. Enter the Container Platform.

  2. In the left navigation bar, click Storage > Persistent Volume Claims (PVC).

  3. Click on the name of the persistent volume claim in the list.

  4. Switch to the Volume Snapshots tab.

  5. Click Create Volume Snapshot, and configure the relevant parameters as needed.

  6. Click Create. The time taken for the snapshot depends on network conditions and data volume; please be patient.

    When the snapshot changes to Available status, it indicates that the creation was successful.

Creating Volume Snapshots in a Custom Way

  1. Enter the Container Platform.

  2. In the left navigation bar, click Storage > Volume Snapshots.

  3. Click Create Volume Snapshot, and configure the relevant parameters as needed.

  4. Click Create. The time taken for the snapshot depends on network conditions and data volume; please be patient.

    When the snapshot changes to Available status, it indicates that the creation was successful.

Creating Persistent Volume Claims from Volume Snapshots

Currently, the platform only supports creating volume snapshots using PVCs created from storage classes with Dynamic Provisioning. You can create new PVCs based on that snapshot and bind them.

Note: The access modes supported when creating a PVC from a snapshot differ from those supported when creating a PVC from a storage class, as highlighted in bold in the table.

Storage Class Used for Creating Volume SnapshotsSingle Node Read-Write (RWO)Multi-Node Read-Only (ROX)Multi-Node Read-Write (RWX)
TopoLVMSupportedNot SupportedNot Supported
CephRBD Block StorageSupportedNot SupportedNot Supported
CephFS File StorageSupportedSupportedSupported

Method One

  1. Enter the Container Platform.

  2. In the left navigation bar, click Storage > Persistent Volume Claims (PVC).

  3. Click on the name of the persistent volume claim in the list.

  4. Switch to the Volume Snapshots tab.

  5. Click the ⋮ next to the corresponding volume snapshot in the list and select Create Persistent Volume Claim, configuring the relevant parameters.

  6. Click Create.

Method Two

  1. Enter the Container Platform.

  2. In the left navigation bar, click Storage > Volume Snapshots.

  3. Click the ⋮ next to the corresponding volume snapshot in the list and select Create Persistent Volume Claim, configuring the relevant parameters.

  4. Click Create.