All Products
Search
Document Center

Elastic Compute Service:Create an automatic snapshot policy

Last Updated:Aug 28, 2024

You can create automatic snapshot policies to create snapshots for disks on the specified schedules. This prevents data loss due to irregular snapshot creation and improves the reliability and stability of the system. Elastic Compute Service (ECS) supports the cross-region snapshot replication feature to ensure that snapshots are available in the event of region-level disasters or failures. This topic describes how to create an automatic snapshot policy.

Considerations

  • The Snapshot service provides a quota of 1,000 automatic snapshots for each disk. If the maximum number of automatic snapshots for a disk is reached and a new snapshot creation task is created, the system deletes the oldest automatic snapshot that was created based on the automatic snapshot policy of the disk.

  • If a disk contains a large amount of data, when a snapshot creation task is being executed and a new snapshot creation task is due, the system skips the new task. For example, an automatic snapshot policy specifies that automatic snapshots are created at 9:00:00, 10:00:00, and 11:00:00. If a snapshot creation task requires 70 minutes to complete starting from 9:00:00 up to 10:10:00, the system runs the next snapshot creation task at 11:00:00, instead of 10:00:00.

  • If a disk is attached to an Elastic Compute Service (ECS) instance, snapshots can be created based on an automatic snapshot policy of the disk only if the instance is in the Running or Stopped state. If the instance is being stopped or restarted, the system cannot create snapshots for the disk based on the automatic snapshot policy.

Procedure

  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 and then click Create Policy.

  5. On the Create Automatic Snapshot Policy page, configure the parameters. The following tables describe the parameters.

    Configure basic policy settings

    Parameter

    Description

    Policy Name

    The name of the automatic snapshot policy.

    Execution Frequency

    The days of the week on which to create automatic snapshots. You can select one or more days from Monday to Sunday.

    Execution Time

    The points in time at which you want to create automatic snapshots. The time is in UTC+8 with units in hours. Automatic snapshots are created within 1 hour after the points in time specified by the Execution Time parameter. You can select multiple on-the-hour points in time from 00:00 to 23:00 for creating automatic snapshots.

    Important

    When a snapshot is being created for an Elastic Block Storage (EBS) device, the I/O performance of the device degrades by up to 10%. This can result in a transient I/O speed decrease. We recommend that you create automatic snapshots during off-peak hours.

    Retention Period

    The retention period of automatic snapshots. Default value: Until Deleted. You can also specify a custom retention period. After the retention period of automatic snapshots ends, the system automatically deletes the snapshots.

    • Custom Period: Specify a retention period. Unit: days. Valid values: 1 to 65535.

    • Until Deleted: Created automatic snapshots are retained based on the number of automatic snapshots. After the maximum number of automatic snapshots is reached, the oldest snapshot is automatically deleted when a new snapshot is created.

    Important
    • If the remaining snapshot retention period is a few days such as three days, Released After {days} Days appears in the Retention Period column corresponding to the snapshot on the Disk Snapshots tab.

    • If you select Custom Period and specify a retention period in days for snapshots, you can extend the retention period of each snapshot that is created based on the automatic snapshot policy after you create the policy. For more information, see Extend the retention period of a snapshot.

    • If you modify the Retention Period parameter of an automatic snapshot policy, the new retention period takes effect only for new automatic snapshots. For information about how to modify an automatic snapshot policy, see Modify an automatic snapshot policy. For example, after you change the value of the Retention Period parameter from 20 days to 10 days, new snapshots that are created based on the policy are retained for 10 days. Existing snapshots that were created based on the automatic snapshot policy are retained for 20 days.

    Configure a cross-region snapshot replication policy

    Important
    • After a snapshot is copied to a destination region, a snapshot copy is generated in the region. You are charged a data transfer fee for copying the snapshot. You are also charged a snapshot storage fee for the snapshot copy in the destination region based on the snapshot size and storage duration. For more information, see Snapshots.

    • For information about how to copy a snapshot, see Copy a snapshot.

    Parameter

    Description

    Cross-region Snapshot Replication

    After you enable cross-region snapshot replication, automatic snapshots created by using the automatic snapshot policy are copied to the destination region for data backup and disaster recovery.

    Destination Region

    The region to which the automatic snapshots are copied.

    Retention Period of Snapshot Copies

    The retention period of snapshot copies in the destination region.

    Copy and Encrypt

    • Leave Enable unselected. For an encrypted snapshot, a snapshot copy is created in the destination region and encrypted by using the default service customer master key (CMK) that was created by Key Management Service (KMS) in the destination region. For an unencrypted snapshot, an unencrypted snapshot copy is created in the destination region.

    • Select Enable. A snapshot copy is created and encrypted by using the specified encryption key in the destination region, regardless of whether the source snapshot is encrypted.

    Configure advanced settings

    Parameter

    Description

    Tag

    The tags of the automatic snapshot policy. The specified tags are added to the automatic snapshots that are created based on the automatic snapshot policy. Select or create tag keys and values. For information about tags, see Tags.

    You can modify the tags of an automatic snapshot policy after the policy is created. For more information, see Edit the tags of an automatic snapshot policy.

    Resource Group

    The resource group to which to assign the automatic snapshot policy. For more information, see Resource groups.

  6. Click OK.