百度智能云

All Product Document

          Cloud Disk Service

          Instruction for use

          Overview

          A snapshot is a kind of data status file of one Cloud Disk Service (CDS) at a certain time node. You can create a snapshot for the CDS at a certain time to save the data of the CDS at the time. By snapshots, you can realize the backup of disk data, recovery of disk data and creation of disk images.

          Note:

          • Currently, the snapshots of cloud platform don't occupy the storage space purchased by the users and can be used for free;
          • CDs snapshot service has been charged on March 13, 2020. For details, please refer to Snapshot Billing Help document;
          • The snapshots of cloud platform adopt the distributed multi-replica redundant storage technology for saving. The snapshot data are highly reliable.

          Usage Scenarios

          The snapshot is a kind of highly-reliable data backup mode. You can use snapshots for the CDS in various scenarios.

          • Disk backup: You can regularly backup the CDS by snapshots to prevent the loss of important data in the disk;
          • Disaster recovery backup: If you want to switch the operation system for the BCC instance or make a significant update to the server, we strongly recommend you to implement the snapshot operation for the disk to avoid accidental deletion of important data;
          • Change of disk configuration: If you want to scale up the disk, change the disk type, etc., we strongly recommend you to first implement the snapshot operation for the disk to prevent accidental deletion of important data in the disk;
          • Disk unloading: If you want to Uninstall or Release the disk, we strongly recommend you to first implement the snapshot operation for the disk to prevent loss of important data;
          • Disk rollback: If you want to roll back the data in the disk to the status at a moment of the past, you can use the snapshot for Disk Rollback Operation;
          • Custom image: If you want to build a system disk environment which is the same as the existing system disk, you can use the snapshot to create a system disk to implement "Custom Image".

          Snapshot Principle

          The CDS adopts the distributed storage technology. When you create and format a cloud disk, the logic disk will be divided into several data blocks. When the data are written into a cloud disk, the data are essentially written into the corresponding data block. When the data in one data block change (such as data writing and data deletion), only the data in the data block change.

          Accordingly, the snapshot services adopt the advanced incremental snapshot technology in the industry, namely, you create snapshots for the disk before and after variation of disk data respectively. Only the snapshot data corresponding to the changed data block change, and those corresponding to the unchanged data block remain unchanged. The incremental snapshot technology can dramatically reduce the similar redundancy of snapshot data to minimize your snapshot costs.

          image.png

          As shown in the Figure above: The snapshots V1, V2 and V3 are respectively the first, the second and the third snapshots created for the disk.

          Create the first snapshot

          The snapshot V1 is the first snapshot created for the disk. The snapshot data is divided into 4 data blocks, namely: M1, N1, Q1, and P1.

          Note:

          • For most cloud disks created before October 2017, the first snapshot is a full snapshot, i.e., the system does not detect the valid write data in the disk but create a snapshot for the full capacity of the disk. For example, if the size of the purchased cloud disk is 50 GB and the data written by the user to the disk is only 10 GB, the capacity of the first snapshot is 50 GB instead of 10 GB;
          • For cloud disks created after October 2017, the first snapshot is an incremental snapshot. In the above example, the first snapshot created for the disk has a capacity of 10 GB;
          • File deletion at the file system layer cannot be perceived by the block device layer.

          Create snapshot

          All CDSs are incremental snapshots starting from the second snapshot. In the above figure, snapshot V2 is the second snapshot created by the disk. A data block is added to the original 4 data blocks: S2. The other data blocks all point to the four data blocks in V1 and will not add repeated data blocks with the same data;

          The snapshot V3 is the third snapshot created for the disk. By comparing V3 with V2, the data in only the N3 data block change. So, the M1, Q1 and P1 data blocks included in V3 still refer to M1, Q1 and P1 in V1, S2 refers to data block S2 in V2, and N3 is the data block added this time.

          Delete snapshot

          When deleting the snapshot V3, the users only delete data block N3 , and other data blocks with a referential relationship are retained. Therefore, the deletion of snapshot V3 only doesn't cause V1 and V2 unavailable.

          Roll back snapshot

          When the users want to roll back the disk to the status of snapshot V3, data blocks M1, N3, Q1, P1 and S2 are all recovered to the disk to guarantee the accurate rollback of data.

          Data size in the snapshot chain

          The total blocks contained in the snapshot chain corresponding to the disk are: 4 + 1 + 1 = 6, not 4 + 5 +5 = 14.


          Snapshot Mode

          You can implement the snapshot operation for the disk by manual snapshot or setting automatic snapshot.

          • Manual snapshot: You should actively initiate the manual snapshot. For the detailed operation, please view Create Manual Snapshot.
          • Automatic snapshot: You can add an automatic snapshot policy when creating an automatic For the detailed operation, please view Automatic Snapshot.

          Upper Limit of Snapshots

          Each CDS can create a total of 512 snapshot data, including 256 manual snapshots and 256 automatic snapshots.

          • If the automatic snapshot quota of the disk reaches the upper limit, the automatic snapshot with the earliest creation time will be automatically deleted, and the new automatic snapshot will not be affected.
          • If the manual snapshot quota of the disk reaches the upper limit, creating new manual snapshots is prohibited. Please clean up unnecessary manual snapshot data in time. When the number of manual disk snapshots reaches the upper limit, in the disk list of the CDS console, a small red alarm clock icon will appear behind the name of the CDS whose snapshots have reached the upper limit.

          Valid Time of Snapshot

          The manual snapshots or automatic snapshots of CDS vary from creation to valid time in accordance with the snapshot sizes. The average time ranges from seconds to minutes.

          Previous
          Snapshot Chain
          Next
          Disk Snapshot