A snapshot is the data backup of a cloud disk at a certain point in time. Data writing and modification to the cloud disk do not affect snapshots that are already created. Based on this feature, users can use snapshots to record cloud disk data at different points in time, which can be used to fulfill requirements for system recovery, disaster recovery, and cloud disk replication.
As shown in the following figure, Snapshot 1 retains data block information of the cloud disk at 10:00 (the snapshot creation time), regardless of any changes to the disk that occur after the snapshot is created.
Snapshot only saves data blocks in the cloud disk that have been written to or modified. Therefore, the size of the snapshot corresponding to the cloud disk will be smaller than the size of the cloud disk.
Relationship between snapshot size and data disk is shown in the following figure:
Tencent Cloud snapshots use an incremental snapshot mechanism. When you continuously create multiple snapshots of the same cloud disk, only the first snapshot is a full snapshot, and subsequent snapshots only contain data that has been modified relative to the previous snapshot (incremental snapshot). This can minimize the total storage capacity occupied when users continuously create snapshots, reducing user costs.
For example: Assume a cloud disk has three data blocks, A, B, and C. You make snapshots at 10:00, 11:00, and 12:00 respectively. Changes of data blocks on the disk between these points in time are shown in the following figure, and each snapshot should save the following data:
Based on the previous example, when you use Snapshot 3 to perform data rollback, the system will merge the data in Snapshot 1, Snapshot 2, and Snapshot 3. If there is a data block in the same location, data in the newest snapshot will be taken. During final rollback, the merged data will be written to the cloud disk to be rolled back.
Incremental snapshot rollback process is as shown in the following figure:
Based on the previous example, if you delete Snapshot 1, the system will merge Snapshot 1 and Snapshot 2, and will use Snapshot 2’s data to overwrite Snapshot 1’s data in the same location. After merging, Snapshot 2 is the new full snapshot.
Incremental snapshot deletion process is as shown in the following figure: