The Alibaba Cloud snapshot service is an agentless backup service that allows you to create crash-consistent snapshots for system disks or data disks. You can use snapshots to back up data, restore instances that were released by mistake, and create custom images. You can create snapshots of disks to improve fault tolerance for operations before you roll back a disk, modify key system files, or change the operating system of an instance.
- The disk is in the In Use or Unattached state.
- If the disk is in the In Use state, the Elastic Compute Service (ECS) instance is in the Running or Stopped state.
It can take several minutes to create a snapshot based on the size of the disk. The first snapshot of each disk is a full snapshot and takes longer to create. Subsequent snapshots of the disk are incremental snapshots. It does not take as long to create an incremental snapshot, and the amount of time required varies based on the amount of data changed since the previous snapshot. The more data that has changed, the longer it takes.
- Do not perform operations that change the state of the ECS instance, such as stopping or restarting the instance.
- You are charged for snapshots. For more information, see Snapshots.
- We recommend that you create snapshots during off-peak hours because snapshot creation degrades the I/O performance of disks by up to 10% and slows down data reads and writes.
- While snapshots are being created, the incremental data generated by disk operations is not included in the snapshots.
- If you create an extended volume from a single multi-partition disk, the snapshot that you created can be used to roll back the disk.
- When a disk is used to create a dynamic extended volume or a RAID array, we recommend that you create an instance snapshot and enable the application-consistent snapshot feature. For more information, see Create snapshots for multiple disks together by creating an instance snapshot and Enable the application-consistent snapshot feature.
- Created snapshots are permanently stored unless you delete them. We recommend that you delete unnecessary snapshots on a regular basis to prevent extra fees incurred by snapshot storage.
Create a snapshot in the ECS console
You can go to the Instances page in the ECS console and perform the following operations to create a snapshot for a disk:
- Log on to the ECS console.
- In the left-side navigation pane, choose .
- In the top navigation bar, select a region.
- Find the instance for which you want to create a snapshot and click the instance ID.
- On the Instance Details page, click the Cloud Disk tab.
- Find the disk for which you want to create a snapshot, and click Create Snapshot in the Actions column.
- In the dialog box that appears, configure the following parameters, and then click
Parameter Description Snapshot Name The name of the snapshot.
The name cannot start with auto because a snapshot whose name starts with auto is recognized as an automatic snapshot.
Instant Access The instance access feature can accelerate the process of snapshot creation. You can use the instant access feature to create snapshots within seconds.
If you create a snapshot for an enhanced SSD (ESSD), you can turn on Instant Access. For more information, see Enable or disable the instant access feature.
Duration of Instant Access The number of days during which the instant access feature is available. The instant access feature is automatically disabled when the specified duration of instant access expires. Tag The tag key and value of the snapshot.After the snapshot is created, you can click the Snapshot tab on the Instance Details page to view the created snapshot.
Create a snapshot by using Alibaba Cloud CLI
- Obtain the instance ID.
- Method 1: If you are connected to the ECS instance, you can obtain the instance ID
from the instance metadata. For more information, see Overview of ECS instance metadata.
For example, to query the ID of a Linux instance, run the following command:
- Method 2: Use Alibaba Cloud CLI to call the DescribeInstances operation to obtain the instance ID.
aliyun ecs DescribeInstances --RegionId <TheRegionId> --output cols=InstanceId,InstanceName rows=Instances.Instance
- Method 1: If you are connected to the ECS instance, you can obtain the instance ID from the instance metadata. For more information, see Overview of ECS instance metadata.
- Call the DescribeDisks operation to obtain the disk ID.
aliyun ecs DescribeDisks --RegionId <TheRegionId> --InstanceId i-bp1afnc98r8k69****** --output cols=DiskId rows=Disks.Disk
- Call the CreateSnapshot operation to create a snapshot for a specified disk.
aliyun ecs CreateSnapshot --DiskId d-bp19pjyf12hebp******If the following information is returned, the task to create a snapshot is initiated:
- Call the DescribeSnapshots operation to query the creation progress.
aliyun ecs DescribeSnapshots --RegionId cn-hangzhou --InstanceId i-bp1afnc98r8k69****** --output cols=SnapshotId,Status rows=Snapshots.Snapshot
"Status":"accomplished"are displayed, the snapshot is created.