All Products
Search
Document Center

Elastic Compute Service:Create an automatic snapshot policy

Last Updated:Feb 12, 2025

You can create automatic snapshot policies to create snapshots on schedule for the cloud disks associated with the policies. This prevents data loss due to irregular snapshot creation and improves the reliability and stability of the system. Elastic Compute Service (ECS) provides 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.

Prerequisites

The ECS Snapshot service is activated. For more information, see Activate ECS Snapshot.

Procedure

Note

If no automatic snapshot policy exists in a region, the system creates a default automatic snapshot policy named default_policy the first time you specify an automatic snapshot policy for a cloud disk in the region. You can use the default automatic snapshot policy or create a custom automatic snapshot policy based on your business requirements.

  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 that you want to manage belongs. 地域

  4. Click the Automatic Snapshot Policies tab, and then click Create Automatic Snapshot Policy.

  5. On the Create Automatic Snapshot Policy page, configure the parameters and click OK.

    Policy Details

    Configure the name, execution schedule, and snapshot retention period of the automatic snapshot policy.

    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 of the day at which to create automatic snapshots. The time is in UTC+8. Unit: hours.

    • Automatic snapshots are created within 1 hour after the points in time specified by the Execution Time parameter.

    • To create automatic snapshots at multiple points in time of the day, specify multiple on-the-hour points in time from 00:00:00 to 23:00:00.

    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 may 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 specify a custom retention period for automatic snapshots.

    • Custom Period: After the retention period of an automatic snapshot ends, the snapshot expires and is automatically deleted.

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

    Note
    • If the remaining retention period of a snapshot is a few days, such as three days, Released After {days} Days appears in the Retention Period column that corresponds to the snapshot on the Disk Snapshots tab. You can extend the retention period of a snapshot before the snapshot expires. For more information, see Extend the retention period of a snapshot.

    • For information about the quota of automatic snapshots, see the Limits section of the "Overview" topic.

    • After an automatic snapshot policy is created, you can modify the policy to change the retention period of automatic snapshots. For more information, see Modify an automatic snapshot policy. The new retention period does not affect existing automatic snapshots and takes effect only on new automatic snapshots. For example, after you change the value of the Retention Period parameter from 20 days to 10 days, new automatic snapshots that are created based on the automatic snapshot policy are retained for 10 days. Existing snapshots that were created based on the automatic snapshot policy are still retained for 20 days.

    • 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 disk is a system disk, the automatic snapshots of the disk are also automatically deleted when the disk is replaced.

    • Regardless of whether snapshots are retained for a specific period of time or permanently, you can delete snapshots based on your business requirements to prevent unnecessary charges. For information about how to delete a snapshot, see Delete a snapshot.

    Cross-region Replication

    Important
    • After you copy a snapshot to a destination region, a snapshot copy is generated in the region. You are charged data transfer fees for replicating the snapshot. You are also charged snapshot storage fees for the snapshot copy in the destination region based on the snapshot size and the 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 the cross-region snapshot replication feature, automatic snapshots created based on 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

    • Clear Enable. For an encrypted snapshot, a snapshot copy is created in the destination region and encrypted by using the service key 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.

    For more information about encryption keys, see the Encryption keys section of the "Encrypt cloud disks" topic.

    Advanced Settings

    Parameter

    Description

    Tag

    The tags of the automatic snapshot policy. Automatic snapshots created based on the automatic snapshot policy have the specified tags added. Select existing tag keys and values, or enter new 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 the automatic snapshot policy belongs. For more information, see Resource groups.

  6. Associate the automatic snapshot policy that you created with cloud disks at the earliest opportunity to back up disk data.

    For information about how to associate an automatic snapshot policy with a cloud disk, see Configure an automatic snapshot policy for a cloud disk.