You can associate existing automatic snapshot policies with cloud disks. After you associate an automatic snapshot policy with a cloud disk, automatic snapshots are created for the disk based on the policy to back up the data stored on the disk.
Considerations
Before you configure an automatic snapshot policy for a cloud disk, take note of the following items:
If a snapshot creation task is being executed and another snapshot creation task is due for a cloud disk that contains a large volume of data, the system skips the new task. For example, an automatic snapshot policy specifies that automatic snapshots are created at 09:00:00, 10:00:00, and 11:00:00. If a snapshot creation task requires 70 minutes to complete from 09:00:00 to 10:10:00, the system executes the next snapshot creation task at 11:00:00, instead of 10:00:00.
The following limits apply to manual and automatic snapshots:
If a snapshot is being manually or automatically created for a cloud disk when the point in time specified in the associated automatic snapshot policy is reached, the automatic snapshot cannot be created based on the policy at the point in time. An automatic snapshot is created for the disk at the next point in time specified in the automatic snapshot policy.
If an automatic snapshot is being created for a cloud disk, you cannot create a manual snapshot for the disk. Wait until the automatic snapshot is created.
After automatic snapshots are created, you are charged storage fees for the snapshots per region based on the total size of automatic snapshots stored in the region. For more information, see Snapshots.
After a snapshot is created, the snapshot is automatically stored in an Object Storage Service (OSS) bucket. You cannot select an OSS bucket to store the snapshot or view the snapshot data. For more information, see the Storage locations section of the "Overview" topic.
Limits
Before you configure an automatic snapshot policy for a cloud disk, make sure that the disk is in the In Use or Unattached state.
If the disk is in the In Use state, make sure that the Elastic Compute Service (ECS) instance to which the disk is attached is in the Running or Stopped state. If the ECS instance to which a cloud disk is attached is being stopped or restarted, the system cannot create snapshots for the disk based on the associated automatic snapshot policy.
If the disk is in the Unattached state, make sure that the disk was attached to an ECS instance at least once. You cannot configure automatic snapshot policies for cloud disks that were never attached to ECS instances.
NoteIf a cloud disk was never attached to ECS instances, the data stored on the disk remains unchanged after the disk is created, and you do not need to create snapshots for the disk.
You can configure only one automatic snapshot policy for each cloud disk and associate an automatic snapshot policy with multiple cloud disks at the same time.
Procedure
Configure an automatic snapshot policy for existing cloud disks
Method 1: Associate an automatic snapshot policy with cloud disks on the Automatic Snapshot Policies tab
Log on to the ECS console and associate an automatic snapshot policy with one or more cloud disks on the Automatic Snapshot Policies tab of the Snapshots page.
Log on to the ECS console.
In the left-side navigation pane, choose .
In the top navigation bar, select the region and resource group to which the resource belongs.
On the Snapshots page, click the Automatic Snapshot Policies tab.
On the Automatic Snapshot Policies tab, find the automatic snapshot policy that you want to manage and click Associate Cloud Disks in the Actions column.
In the Associate Cloud Disks dialog box, select the cloud disks with which you want to associate the automatic snapshot policy.
Select one or more cloud disks in the Unselected Disks section and click the
icon to move the disks to the Selected Disks section.
Click Associate.
NoteIf you want to disassociate the automatic snapshot policy from one or more cloud disks, select the cloud disks in the Selected Disks section and click the
icon to move the disks to the Unselected Disks section.
Method 2: Associate an automatic snapshot policy with a cloud disk on the Cloud Disk tab
Log on to the ECS console and associate an automatic snapshot policy with a cloud disk on the Cloud Disk tab of the Block Storage page.
Log on to the ECS console.
In the left-side navigation pane, choose .
In the top navigation bar, select the region and resource group to which the resource belongs.
On the Block Storage page, find the cloud disk that you want to manage and click Configure Automatic Snapshot Policy in the Actions column.
In the Configure Automatic Snapshot Policy dialog box, associate an automatic snapshot policy with the cloud disk.
An automatic snapshot policy is already associated with the cloud disk
If an automatic snapshot policy exists in the current region and is already associated with the cloud disk, you can change the policy for the disk.
Select a different policy or Create Automatic Snapshot Policy from the Automatic Snapshot Policy drop-down list.
Click Enable Automatic Snapshot Policy.
NoteTo disassociate the automatic snapshot policy from the cloud disk, perform the following steps:
Turn off
.
Click Disable Automatic Snapshot Policy.
Automatic snapshot policies exist but are not associated with the cloud disk
If automatic snapshot policies exist in the current region but no automatic snapshot policy is associated with the cloud disk, you can associate an automatic snapshot policy with the disk.
Select a policy from the Automatic Snapshot Policy drop-down list.
Click Enable Automatic Snapshot Policy.
No automatic snapshot policies exist
If no automatic snapshot policies exist in the current region, you can create an automatic snapshot policy for the cloud disk based on your business requirements.
Set the Automatic Snapshot Policy parameter to Back Up Every Day, Back Up Every Week, or Use Custom Policy.
Select Create Automatic Snapshot Policy or the default policy default_policy from the Policy Details drop-down list and configure the other parameters for the policy.
Click Enable Automatic Snapshot Policy.
Configure an automatic snapshot policy when you create an ECS instance
You can associate automatic snapshot policies with the system disk or data disks when you create an ECS instance.
Log on to the ECS console.
In the left-side navigation pane, choose .
In the top navigation bar, select the region and resource group to which the resource belongs.
On the Instance page, click Create Instance.
In the Snapshot parameter of the Storage section, select an automatic snapshot policy for the system disk or a data disk.
NoteIf no automatic snapshot policies exist in the current region, you can select the default policy default_policy or click Create Automatic Snapshot Policy to create an automatic snapshot policy on the Automatic Snapshot Policies tab of the Snapshots page. For more information, see Create an automatic snapshot policy.
For information about the other parameters and the steps for creating an ECS instance, see Create an instance on the Custom Launch tab.
What to do next
View created automatic snapshots
When a point in time specified in an automatic snapshot policy arrives, a snapshot whose name starts with auto2.0 is automatically created for each cloud disk that is associated with the policy. On the Disk Snapshots tab of the Snapshots page, Automatic Creation is displayed in the Creation Method column corresponding to the snapshot. All snapshots that are created based on automatic snapshot policies are named in the auto2.0_yyyyMMdd_SnapshotPolicyId format.
auto2.0: the automatic snapshot.
yyyyMMdd: the date on which the snapshot is created. yyyy stands for the year, MM for the month, and dd for the day.
SnapshotPolicyId: the ID of the automatic snapshot policy based on which the snapshot is created.
For example, auto2.0_20241225_sp-2zeff8vy17u91rn5**** indicates that an automatic snapshot is created on December 25, 2024 based on the automatic snapshot policy whose ID is sp-2zeff8vy17u91rn5****.
For information about the differences between automatic and manual snapshots, see Snapshot FAQ.
Enable the Delete Automatic Snapshots While Releasing Disk attribute
By default, automatic snapshots that are created for a cloud disk based on an automatic snapshot policy are retained based on the retention period specified in the policy, and are not automatically deleted when the disk is released. You can enable the Delete Automatic Snapshots While Releasing Disk attribute for a cloud disk based on your business requirements.
If the Delete Automatic Snapshots While Releasing Disk attribute is enabled for a cloud disk, the automatic snapshots of the disk are automatically deleted when the disk is released even if the automatic snapshots have not expired. If the cloud disk is a system disk, the automatic snapshots of the disk are also automatically deleted when the system disk is replaced.
In the cloud disk list, find the cloud disk that you want to manage. In the Actions column, choose
or click .In the Modify Disk Properties dialog box, select Delete Automatic Snapshots While Releasing Disk to enable the Delete Automatic Snapshots While Releasing Disk attribute.
NoteTo disable the Delete Automatic Snapshots While Releasing Disk attribute, clear Delete Automatic Snapshots While Releasing Disk.
Click Confirm.