All Documents
Current Document

Content is empty

If you don't find the content you expect, please try another search term

Documentation

How snapshots work

Last updated:2021-09-22 20:40:51

The snapshot feature of Kingsoft Cloud EBS 3.0 allows you to protect data by creating snapshots based on EBS volumes. You can create multiple snapshots for an EBS volume at different points in time. This helps you ensure service continuity.

A snapshot is a data replica created based on a data source at a specific point in time. Snapshots are one of the various methods for data backup. Creating a snapshot is like taking a photo. Both behaviors capture the state of an object in the current moment. Snapshots can be instantaneously created, which allows you to back up data in real time and quickly restore data. This meets corporate requirements for business continuity and data reliability. In addition, you can use one snapshot to create multiple EBS volumes at a time. This helps you quickly build an application environment and improves business deployment efficiency.

Snapshot technology

EBS adopts the Redirect-On-Write (ROW) snapshot technology, which is significantly improved compared with the conventional Copy-On-Write (COW) snapshot technology. The biggest disadvantage of the COW technology is that write operations are poorly supported. When data is written to a source volume for the first time, the data block to be modified must be copied first. This involves a whole process of data block migration that includes data reading and data writing. Consequently, the write operation will only be performed after the preceding process is complete. However, data on the source volume is not changed, which means read operations are not affected. With the ROW technology, all write operations on an EBS volume will be redirected to a new volume, whereas the source snapshot data is retained on the read-only source volume. In this case, the process of updating data on the source volume involves only one data write operation. EBS takes full advantage of the ROW technology and bypasses its disadvantages to improve the read and write performance and ensure business continuity.

Snapshot mechanism

EBS snapshots are incremental backups. A snapshot records only data that has been updated since the last time a snapshot was created for the EBS volume.

Snapshot.png

  • Snapshot 1 is the first snapshot created based on an EBS volume. It is a full snapshot and contains all the data on the EBS volume at the point in time when the snapshot was created.
  • Snapshot 2 is the second snapshot created based on the EBS volume. It is an incremental snapshot. Snapshot 2 copies only Data block B, which is the only data block that has been updated since Snapshot 1 was created.
  • Snapshot 3 is the third snapshot created base on the EBS volume. It is also an incremental snapshot. Snapshot 3 copies only Data block C, which is the only data block that has been updated since Snapshot 2 was created. Snapshot 3 also references the other data blocks from Snapshot 1 and Snapshot 2.
  • When you use Snapshot 3 to roll back data, the system merges the data in Snapshot 1, Snapshot 2, and Snapshot 3. If a data block is contained in multiple snapshots, the data block in the latest snapshot is used. Then, the merged data is written to the destination EBS volume.
  • When you delete Snapshot 1, the data in Snapshot 1 is merged with the data in Snapshot 2. During the merging process, the data in Snapshot 2 overwrites the corresponding data in Snapshot 1. After the merging is complete, Snapshot 2 becomes a full snapshot.
  • When you delete Snapshot 2, the data in Snapshot 2 is merged with the next incremental snapshot, which is Snapshot 3. The reference to Data block C is retained. In addition, the deletion of Snapshot 2 does not affect data rollback based on Snapshot 1 or Snapshot 3. If the snapshot you want to delete is the latest snapshot created based on an EBS volume, such as Snapshot 3 in this example, the snapshot is directly deleted without triggering a data merging process.
On this page
Pure ModeNormal Mode

Pure Mode

Click to preview the document content in full screen
Feedback