Snapshots and Backups
CCE works with EVS to support snapshots. A snapshot is a complete copy or image of EVS disk data at a certain point of time, which can be used for data DR.
You can create snapshots to rapidly save the disk data at specified time points. In addition, you can use snapshots to create new disks so that the created disks will contain the snapshot data in the beginning.
Notes
- The snapshot function is available only for clusters of v1.15 or later and requires the CSI-based everest add-on.
- The subtype (common I/O, high I/O, or ultra-high I/O), disk mode (SCSI or VBD), data encryption, sharing status, and capacity of an EVS disk created from a snapshot must be the same as those of the disk associated with the snapshot. These attributes cannot be modified after being queried or set.
Application Scenario
The snapshot feature helps address your following needs:
- Routine data backup
You can create snapshots for EVS disks regularly and use snapshots to recover your data in case that data loss or data inconsistency occurred due to misoperations, viruses, or attacks.
- Rapid data restoration
You can create a snapshot or multiple snapshots before an OS change, application software upgrade, or a service data migration. If an exception occurs during the upgrade or migration, service data can be rapidly restored to the time point when the snapshot was created.
For example, a fault occurred on system disk A of ECS A, and therefore ECS A cannot be started. Because system disk A is already faulty, the data on system disk A cannot be restored by rolling back snapshots. In this case, you can use an existing snapshot of system disk A to create EVS disk B and attach it to ECS B that is running properly. Then, ECS B can read data from system disk A using EVS disk B.
The snapshot capability provided by CCE is the same as the CSI snapshot function provided by the Kubernetes community. EVS disks can be created only based on snapshots, and snapshots cannot be rolled back to source EVS disks.
- Rapid deployment of multiple services
You can use a snapshot to create multiple EVS disks containing the same initial data, and these disks can be used as data resources for various services, for example, data mining, report query, and development and testing. This method protects the initial data and creates disks rapidly, meeting the diversified service data requirements.
Operation Overview
- You can create a snapshot to rapidly save the disk data at specified time points.
- You can create an EVS disk from a snapshot so that the EVS disk contains the snapshot data in the beginning. When data is lost, the snapshot can be used to restore the data to point in time when the snapshot was taken.
- When a snapshot is no longer needed, delete it to release the virtual resources.
Creating a Snapshot
You can create EVS snapshots to save the disk data at specific time points.
Snapshots can be created only for EVS disks that are available or in use. A maximum of seven snapshots can be created for a single EVS disk. For details about how to create an EVS disk, see EVS Volumes.
Snapshot data of encrypted disks is stored encrypted, and that of non-encrypted disks is stored non-encrypted.
Procedure
- Log in to the CCE console. In the navigation pane, choose Resource Management > Storage.
- On the Snapshot and backup tab page, click Create Snapshot.
- On the Create Snapshot page displayed, configure parameters listed in Table 1.
Table 1 Parameters for creating a snapshot Parameter
Description
Snapshot Name
Name of the snapshot to be created. The name starts with cce-disksnap- by default, for example, cce-disksnap-01.
Cluster Name
Cluster where the snapshot is deployed.
Namespace
Namespace with which the snapshot is associated.
Select Storage
Select the EVS disk for which the snapshot is to be created.
The disk must be available or in use. For details about how to create a disk, see EVS Volumes.
- Click Create.
- Click Back to Snapshot List. When the snapshot status changes to Normal, the snapshot is successfully created.
Click
on the left of the snapshot name to view the snapshot status and details.
Creating a Disk from a Snapshot
On the snapshot list page, you can select a snapshot to create an EVS disk.
In this mode, pay attention to the following constraints:
- The disk type, disk mode, and encryption setting of the created disk are consistent with those of the snapshot's source EVS disk.
- A snapshot can be used to create a maximum of 128 EVS disks.
- Batch disk creation is not supported, and the quantity parameter must be set to 1.
Procedure
- Log in to the CCE console. In the navigation pane, choose Resource Management > Storage.
- Click the Snapshot and backup tab. In the snapshot list, locate the target snapshot and click Create Data Volume in the Operation column.
- Set the parameters of the EVS disk. For details, see EVS Volumes.
When you use a snapshot to create an EVS disk, the capacity must be greater than or equal to the snapshot size. In the condition that you do not specify the disk capacity, if the snapshot size is smaller than 10 GB, the default capacity 10 GB will be used as the disk capacity; if the snapshot size is greater than 10 GB, the disk capacity will be consistent with the snapshot size.
- Click Buy Now.
- Pay for the order as prompted and click Submit.
- On the page indicating that the task is submitted successfully, click Go to Storage. On the EVS tab page, view the status of the EVS disk.
When the EVS disk status changes to Available, the EVS disk is created successfully.
Deleting a Snapshot
If a snapshot is no longer used, you can release the virtual resources by deleting the snapshot from the system. Snapshot deletion has the following constraints:
- A snapshot can be deleted only when its status is Available or Error.
- If an EVS disk is deleted, all the snapshots created for this disk will also be deleted.
Procedure
- Log in to the CCE console. In the navigation pane, choose Resource Management > Storage.
- Click the Snapshot and backup tab. In the snapshot list, locate the target snapshot and click Delete in the Operation column.
- (Optional) If multiple snapshots are to be deleted, select
in front of each snapshot and click Delete in the upper area of the list. - In the dialog box displayed, enter DELETE, and click Yes.
Related Operations
For details about EVS snapshots, see Snapshot FAQs.
Reference Documents
Last Article: Setting Mount Options
Next Article: Storage (FlexVolume)
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.