All Products
Search
Document Center

Elastic Compute Service:Enable or disable an automatic snapshot policy

Last Updated:Jun 21, 2024

You can enable existing automatic snapshot policies for disks. After you enable an automatic snapshot policy for a disk, snapshots are automatically created for the disk based on the policy to back up data on the disk. This topic describes how to enable or disable an automatic snapshot policy for one or more disks.

Enable or disable an automatic snapshot policy for multiple disks

On the Snapshots page of the Elastic Compute Service (ECS) console, you can enable or disable an automatic snapshot policy for multiple system disks or data disks.

  1. Log on to the ECS console.

  2. In the left-side navigation pane, choose Storage & Snapshots > Snapshots.

  3. In the top navigation bar, select the region and resource group to which the resource belongs. 地域

  4. On the Snapshots page, click the Automatic Snapshot Policies tab.

  5. On the Automatic Snapshot Policies tab, find the automatic snapshot policy that you want to manage and click Configure Disks in the Actions column.

  6. In the Configure Disks dialog box, enable or disable the automatic snapshot policy for disks.

Enable different automatic snapshot policies for the system disk or data disks of an ECS instance

When you create an ECS instance, you can enable an automatic snapshot policy for the system disk and enable another automatic snapshot policy for the data disks.

  1. Log on to the ECS console.

  2. In the left-side navigation pane, choose Instances & Images > Instances.

  3. In the top navigation bar, select the region and resource group to which the resource belongs. 地域

  4. On the instance list page, click Create Instance.

    • In the Snapshot field of the Storage section, select an automatic snapshot policy for the system disk and select another automatic snapshot policy for the data disks.

      If no automatic snapshot policies are available, click Create Automatic Snapshot Policy to go to the Automatic Snapshot Policies tab of the Snapshots page and create automatic snapshot policies. For more information, see Create an automatic snapshot policy.

    • For information about the other parameters and the steps for creating an instance, see Create an instance on the Custom Launch tab.

    image.png

Enable or disable an automatic snapshot policy for a single disk

On the Disks page of the ECS console, you can enable or disable an automatic snapshot policy for a single system disk or data disk.

  1. Log on to the ECS console.

  2. In the left-side navigation pane, choose Storage & Snapshots > Block Storage (Disks) .

  3. In the top navigation bar, select the region and resource group to which the resource belongs. 地域

  4. On the Disks page, find the disk that you want to manage and click Configure Automatic Snapshot Policy in the Actions column.

    Note

    If a disk is in the Unattached state and has never been attached to instances, the data that is stored on the disk remains unchanged. In this case, you do not need to create snapshots for the disk and cannot configure an automatic snapshot policy for the disk.

  5. In the Configure Automatic Snapshot Policy dialog box, enable or disable an automatic snapshot policy for the disk.

    Scenario in which automatic snapshot policies exist and an automatic snapshot policy is associated with the disk

    If automatic snapshot policies exist in the current region and an automatic snapshot policy is enabled for the disk, you can change or disable the policy for the disk.

    • Change the automatic snapshot policy that is associated with the disk.

      1. Select a different policy or Create Automatic Snapshot Policy from the Automatic Snapshot Policy drop-down list.

      2. Click OK.

    • Disable the automatic snapshot policy for the disk.

      1. Turn off the image.png switch.

      2. Click OK.

    image.png

    Scenario in which automatic snapshot policies exist and no automatic snapshot policy is associated with the disk

    If automatic snapshot policies exist in the current region but no automatic snapshot policy is enabled for the disk, you can enable an automatic snapshot policy for the disk.

    1. Select a policy from the Automatic Snapshot Policy drop-down list.

    2. Click OK.

    image.png

    Scenario in which no automatic snapshot policies exist

    If no automatic snapshot policies exist in the current region, you can create an automatic snapshot policy for the disk based on your business requirements.

    1. Set the Automatic Snapshot Policy parameter to Back Up Every Day, Back Up Every Week, or Use Custom Policy.

    2. 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.

    3. Click OK.

    image.png

Related operations

View the number of disks that are associated with an automatic snapshot policy

  1. In the left-side navigation pane of the ECS console, choose Storage & Snapshots > Snapshots.

  2. On the Snapshots page, click the Automatic Snapshot Policies tab.

  3. In the Associated Disks column corresponding to an automatic snapshot policy, view the number of disks that are associated with the policy.

    You can click the number to go to the Disks page and view the details of the disks.

    image.png

View the automatic snapshots that are created based on an automatic snapshot policy

When a point in time that is designated in an automatic snapshot policy arrives, a snapshot whose name starts with auto2.0 is automatically created for each 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.

Note
  • If a snapshot is being manually or automatically created for a disk when a point in time designated in the associated automatic snapshot policy arrives, 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 that is designated in the automatic snapshot policy.

  • If an automatic snapshot is being created for a disk, you cannot create a manual snapshot for the disk. Wait until the automatic snapshot is created.

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_20221019_sp-bp10ecsbl64i827e***** indicates that an automatic snapshot was created on October 19, 2022 based on the automatic snapshot policy whose ID is sp-bp10ecsbl64i827e*****.自动快照