Snapshot Principle

Last Updated At: 2025-10-21 09:10:00

Snapshot and Source Disk

A snapshot is a data backup of the cloud disk at a certain time. The write-in and modification of data in the cloud disk will not affect the created snapshot. Based on this feature, you can use snapshot to record the data of cloud disk at different times for system recovery, disaster recovery and cloud disk replication.

As shown in the following figure, snapshot 1 retains the information of data blocks on the cloud disk at 10:00 (the time point when the snapshot is created), which has nothing to do with subsequent changes.

Snapshot Size and Source Disk

The snapshot only saves the written or modified data blocks in the cloud disk, so generally, the size of the snapshot corresponding to the cloud disk will be smaller than that of the cloud disk.

The relationship between snapshot size and source disk is as follows:

Description of Incremental Snapshot Creation Process

Snapshots use an incremental snapshot mechanism. When you continuously create multiple snapshots of the same CBS, only the first snapshot is a full snapshot, and subsequent snapshots only contain data changes relative to the previous snapshot (incremental snapshot). This minimizes the total storage capacity occupied by consecutive snapshots, reducing user overhead.
For example: Assume the CBS has three data blocks, A, B, and C. You create snapshots at 10:00, 11:00, and 12:00 respectively. Changes of data blocks on the CBS during each time interval are shown in the following figure. Each snapshot should contain the following data:

  • Snapshot 1 (the first snapshot): It refers to the data backup that contains all data blocks on the cloud disk at that time (generally called full snapshot).
  • Snapshot 2: Data block A on the cloud disk changes during the period, and snapshot 2 only contains the latest data backup of data block A (generally called incremental snapshot).
  • Snapshot 3: Data block B on the cloud disk changes during the period, and snapshot 3 only contains the latest data backup of data block B (generally called incremental snapshot).

Description of Incremental Snapshot Rollback Process

Based on the previous examples, when you use snapshot 3 for data rollback, the system will merge the data of snapshot 1, snapshot 2 and snapshot 3. If there are data blocks at the same position, the data in the latest snapshot will be taken. During the final rollback, the merged data set is written to the cloud disk to be rolled back.

The incremental snapshot rollback process is shown in the following figure:

Description of Incremental Snapshot Deletion and Merging Process

  • When the full snapshot (i.e. the first snapshot) is deleted, the system will automatically merge this full snapshot with the next incremental snapshot.
  • When the incremental snapshot is deleted, the system will automatically merge this incremental snapshot with the next incremental snapshot. If there is no next incremental snapshot, the system will directly delete this incremental snapshot.
    Based on the previous examples, if you delete snapshot 1, the system will merge snapshot 1 and snapshot 2 and use the data in snapshot 2 to overwrite the data at the same position of snapshot 1. The merged snapshot 2 becomes a new full snapshot.

The incremental snapshot deletion and merging process is shown in the following figure: