Automatic snapshot policy

Updated at:

You can use an automatic snapshot policy to create automatic snapshots of your disks at scheduled times. This protects your disk data and reduces the risk of data loss that can occur if you forget to create manual snapshots.

Key Capabilities

  • Custom creation frequency

    Specify the days of the week and the times of day for snapshot creation based on your business needs, with support for multiple time points per day. Provide high-frequency protection for core business databases and low-frequency runs for test and archive disks, covering diverse data protection requirements.

  • Custom retention with automatic deletion on expiration

    Set a retention period in days, or choose to retain snapshots permanently. Snapshots are automatically deleted upon expiration without manual intervention, enabling automated snapshot lifecycle management.

  • Multiple resource association types

    • Bind by disk for precise control: Manually select disks to bind, with support for adding or removing them at any time. Ideal for precise protection of specific disks.

    • Dynamically bind by instance tags for unified multi-disk protection: Dynamically bind disks based on ECS instance tags. All disks attached to an instance are automatically included in protection, with no need for per-disk configuration. Tag changes take effect at the next snapshot time point—instances are automatically included when a tag is added and removed when the tag is detached, eliminating manual maintenance of binding relationships. Multiple tags follow a logical AND relationship, enabling precise matching of target instances. When all disks attached to an instance are ESSDs, a snapshot-consistent group is created first to ensure data consistency across disks.

  • Cross-region replication

    After cross-region replication is enabled, snapshots are periodically replicated to the destination region, and you can set a separate retention period for the new snapshots in the destination region. This enables cross-region disaster recovery and meets compliance requirements for off-site data retention.

  • Multiple overlapping policies

    A single disk can be bound to multiple policies, each executed independently without interference. Short-cycle policies create snapshots frequently with short retention, ideal for quickly rolling back routine mishandling; long-cycle policies create snapshots infrequently with long retention, suitable for archiving and compliance requirements.

Use Cases

  • Daily backup and rapid recovery

    Automatically create disk snapshots on a preset schedule to safeguard your data. In the event of an anomaly, you can roll back using snapshots to recover from data loss caused by accidental deletion, viruses, system failures, and more.

  • Batch backup for large-scale instances

    Associate policies by instance tags. When you add a new instance, simply bind it with the tag, and all disks attached to it are automatically included in protection—no per-disk configuration required. This suits business scenarios with large instance fleets and frequent elastic scaling.

  • Balancing high-frequency protection and long-term archiving

    Bind multiple policies to the same disk to meet backup needs at different granularities. High-frequency policies with short-term retention support quick rollback of routine mishandling; low-frequency policies with long-term retention meet archiving and compliance requirements. This strikes a balance between data protection strength and storage costs.

  • Off-site disaster recovery

    Enable cross-region replication to replicate data to a remote region, meeting regulatory requirements for off-site data retention.

  • Protection for databases and multi-disk applications

    Databases are typically deployed across multiple disks. Creating snapshots for each disk independently makes it difficult to align snapshot time points across disks, which can lead to data inconsistency after recovery. After associating a policy by instance tags, when all disks attached to an instance are ESSDs, a snapshot-consistent group is created first to ensure data consistency across disks.

Operation Guide

The following list describes the common operations for automatic snapshot policies, from creation to deletion.

image

Operation

Description

Create automatic snapshot policy

Configure settings such as the schedule and retention period for automatic snapshots.

Apply automatic snapshot policy to a disk

Associate an existing automatic snapshot policy with a disk. The system then creates snapshots automatically at the scheduled times defined in the policy.

Set an automatic snapshot policy for an instance

Important

Currently, associating instance tags is supported for only some customers. If you need this feature, submit a ticket to apply.

  • Automatic binding, maintenance-free: Dynamically bind and unbind disks based on instance tags. Each time an automatic snapshot is created, the current list of instances and their attached disks is retrieved by tag, and snapshots are created accordingly. You don't need to manually adjust policy binding relationships when disks are added or removed.

  • Backup data consistency: By default, snapshots are created for all disks under an instance at the instance level. During creation, the current instances and their attached disks are retrieved by tag; when all disks under an instance are ESSDs, a snapshot-consistent group is created first. This is ideal for large-scale, maintenance-free batch backup scenarios.

Modify automatic snapshot policy

Update settings such as the start time or retention period of an existing automatic snapshot policy.

Schedule automatic snapshot creation

The system creates snapshots automatically based on the schedule defined in the automatic snapshot policy.

Delete automatic snapshot policy

Delete an automatic snapshot policy when it is no longer needed.

Delete snapshots

You can delete automatic snapshots in the following ways:

  • Manually delete an automatic snapshot. This does not affect the automatic snapshot policy that created it.

  • If you enable the delete automatic snapshots when releasing disk property, automatic snapshots are deleted when the associated disk is released.

  • Automatic snapshots are deleted automatically after they exceed their retention period defined in the policy.

  • If the number of automatic snapshots exceeds your quota, the system deletes the oldest snapshots first.

Billing details

Creating an automatic snapshot policy is free of charge. However, you are charged for snapshot storage based on the size of the snapshots and their retention period. For more information, see Snapshot billing.

Limits

Note the following limits when you use automatic snapshot policies:

Limit

Description

Snapshot quota

  • Each account can retain up to 100 automatic snapshot policies per region.

  • For the number of automatic snapshot policies and snapshots allowed per disk, see Snapshot limits.

    Note

    When the number of automatic snapshots for a disk reaches its quota, the oldest snapshots are automatically deleted.

Elastic Block Storage types

ESSD PL-X disks, local disks, and elastic ephemeral disks do not support snapshots.

Data consistency

By default, the generated automatic snapshots are crash-consistent snapshots that contain only the data already written to the disk, excluding data in memory. If your business has strict data consistency requirements, we recommend that you periodically create application-consistent snapshots manually.

Other limits

The following constraints apply during manual and automatic snapshot creation:

  • ESSD series disks (ESSD, ESSD AutoPL, ESSD Entry, and ESSD zone-redundant disks)

    A single disk supports the concurrent creation of manual and automatic snapshots. However, the number of concurrent snapshots that can be created is limited. For more information, see Snapshot limits. If the number of concurrent snapshots that are being created for a disk reaches the upper limit, subsequent snapshot creation tasks fail.

  • Previous generation disks (standard SSDs, ultra disks, and basic disks)

    • Concurrent creation of manual and automatic snapshots is not supported.

    • At the point in time when an automatic snapshot is scheduled to be created, if a snapshot (manual or automatic) is being created for the disk, the system does not create an automatic snapshot at this point in time. An automatic snapshot is created at the next scheduled point in time.

    • If an automatic snapshot is being created for a disk, you must wait for the automatic snapshot to be created before you can manually create a snapshot.

Differences between automatic and manual snapshots

Both automatic and manual snapshots back up disk data at a specific point in time. They differ in their creation methods and naming conventions, as described in the following table:

Difference

Automatic snapshot

Manual snapshot

Creation method

Create snapshots using an automatic snapshot policy.

After you create an automatic snapshot policy and associate it with disks or instance tags, the system automatically creates snapshots for the disks based on the time schedule specified in the policy.

You must create it manually each time.

You can customize snapshot parameters as needed when creating a snapshot.

Snapshot name

Snapshot names are generated automatically by the system.

Names start with auto2.0 and follow the format auto2.0_yyyyMMdd_SnapshotPolicyId, where:

  • auto2.0 indicates an automatic snapshot, distinguishing it from manual snapshots.

  • yyyyMMdd is the snapshot creation date (y = year, M = month, d = day).

  • SnapshotPolicyId is the ID of the automatic snapshot policy used.

You can customize settings when you create a snapshot.