All Products
Search
Document Center

Elastic Compute Service:Data protection and restoration FAQ

Last Updated:Oct 16, 2025

Data protection

Snapshot size

Snapshot billing

Snapshot retention and storage

Automatic snapshot policies

Data restoration

Other

FAQ

What do I need to know when I replace a system disk?

Before you replace a system disk, create a snapshot to back up your data. Ensure that the system disk has at least 1 GiB of reserved capacity. Otherwise, the Elastic Compute Service (ECS) instance may fail to start after the system disk is replaced.

For system disk prices, see the Elastic Compute Service pricing page.

How can I prevent data loss from operational errors?

In scenarios that involve operational risks, you can create snapshots to back up data in advance. Such scenarios include modifying critical system files, migrating an instance from the classic network to a virtual private cloud (VPC), performing routine data backups, recovering a mistakenly released instance, preventing network attacks, replacing an operating system, providing data for a production environment, and performing other high-risk operations. If an error occurs, you can promptly roll back the disk to reduce risks. For more information, see Create a snapshot and Roll back a disk by using a snapshot.

Can I create snapshots for local disks?

No, you cannot. We recommend implementing data redundancy at the application layer or create a deployment set for your cluster to improve application availability. For more information, see Local disks.

Does deleting files in an ECS instance reduce the occupied space?

No, it does not. When you delete a file, a delete marker is added to the file header. This operation does not reduce the space occupied by the disk.

Why is my snapshot size larger than the amount of data shown in the file system?

  • Symptom: You delete files in an ECS instance and then create a snapshot. You find that the snapshot size has not decreased, or the snapshot is larger than the disk space usage reported by the file system.

  • Cause: Operations such as formatting a file system, deleting files, and writing data reduce the number of empty blocks on a disk. This reduces the ability to eliminate empty blocks when a snapshot is created. As a result, the snapshot size is larger than the amount of data displayed in the file system. The inconsistency between the file system size and the snapshot size may be caused by the following reasons:

    • The metadata of the file system occupies disk space.

    • Many blocks are written to the file system during initialization. A block is a logical block address (LBA) on a disk that is divided into blocks of the same size by the block storage service. The write operations occupy disk space.

    • To reduce performance overhead, the file system only creates a deprecation marker in the file properties when a file is deleted. The disk is unaware of the delete instruction. Therefore, the data blocks remain in an allocated state and are copied to the snapshot. This causes the snapshot size to be larger than the file system size.

    • Modules such as Virtio-block for KVM virtualization drivers and Block-front for Xen do not support the TRIM command. The TRIM command is a disk I/O command that indicates a segment of data at an LBA is no longer in use and can be deleted. Without this command, the disk is unaware that the data can be deleted.

How do I view snapshot prices in different regions?

Go to the ECS Pricing Details page and click the Pricing tab. On the Snapshot tab, you can view the unit prices of snapshots in different regions.

image

What are the differences between an OSS resource plan and a Storage Capacity Unit (SCU)?

  • OSS resource plan: An OSS resource plan is a subscription resource plan. It includes various types, such as storage plans and data transfer plans. For more information, see Resource plans.

  • SCU: An SCU is a subscription resource plan that can be used to offset the storage fees of various storage products, such as disks, snapshots, and OSS. After you purchase an SCU, it automatically offsets the pay-as-you-go bills for disks and snapshots in the same region. If the actual capacity of your disks and snapshots exceeds the SCU capacity, the excess usage is automatically billed on a pay-as-you-go basis. For more information, see SCUs.

What billing methods are used for snapshots?

The fees that you may incur for using snapshots include snapshot storage fees and snapshot replication traffic fees. By default, the pay-as-you-go billing method is used. You can purchase a SCU to offset snapshot storage fees. However, these plans cannot be used to offset snapshot replication traffic fees. For more information, see Snapshots.

Is there a free quota for snapshots?

Alibaba Cloud Snapshot provides a free quota of 5 GB. You are charged for usage that exceeds this quota. For more information about snapshot billing, see Snapshots.

Am I charged for enabling the snapshot feature?

Enabling the snapshot service is free. After you create a snapshot, you are billed based on the snapshot size.

  • For more information about snapshot billing, see Snapshots.

  • For more information about enabling the snapshot feature, see Enable snapshots.

Am I charged for using an automatic snapshot policy?

No, you are not. Automatic snapshot policies are free of charge, but you are charged for the automatic snapshots created by the policies. You are charged as long as a snapshot is created, regardless of whether it is an automatic or a manual snapshot. For more information, see Snapshots.

Am I charged for using the snapshot-consistent group feature?

A snapshot consistency group is free of charge, but you are charged for the capacity of the individual disk snapshots that it contains. For more information, see Snapshots.

Are snapshots retained when I delete a disk?

Why are automatic snapshots no longer created for my disk?

When the number of snapshots reaches the quota, the system automatically deletes the earliest automatic snapshot. Manual snapshots are not affected.

Note

An automatic snapshot policy executes only when the disk is attached to an instance.

Will I lose my snapshots if I re-initialize a disk?

No, you will not. Neither manual snapshots nor automatic snapshots will be lost.

Will I lose my snapshots if I replace the system disk?

Manual snapshots of the previous system disk are retained. If automatic snapshots are configured to be released with the disk, they are deleted.

Note

When you replace a system disk, the disk ID changes. Snapshots of the previous system disk cannot be used to roll back the new system disk.

Can I download or export snapshots to a local machine?

No, you cannot. Snapshots cannot be downloaded or exported to a local machine. You can first create a custom image from a snapshot and then export the custom image to your local machine.

Note

Limits apply when you export custom images. First, confirm whether the image created from the snapshot meets the export requirements.

How do I view the data stored in a snapshot?

You cannot directly view data in a snapshot. You can view the data stored in a snapshot using one of the following methods:

If I create a custom image from a snapshot, can I store the image in an OSS bucket?

No, you cannot. A custom image cannot be directly stored in an OSS bucket. You can export the custom image created from the snapshot to an OSS bucket that you specify, and then download and use it from the OSS bucket. For more information, see Export a custom image.

How do I prevent my snapshots from being deleted by Alibaba Cloud?

  • Whether a snapshot is deleted is affected by its retention period.

    When you manually create a snapshot or create an automatic snapshot policy, you can choose to retain it permanently or for a custom number of days. A snapshot is automatically deleted by the system after its retention period expires. You can extend the retention period of manual and automatic snapshots as needed. For more information, see Extend the retention period of a snapshot.

  • If you enable the for an automatic snapshot, the snapshot is deleted when the disk is released (manually released, released with the instance, or when the system disk is replaced), even if the snapshot has not expired. You can disable the Delete Automatic Snapshots While Releasing Disk attribute for an automatic snapshot, the snapshot is deleted when the disk is released (manually released, released with the instance, or when the system disk is replaced), even if the snapshot has not expired. You can disable the Delete Automatic Snapshots While Releasing Disk attribute. In this case, the snapshot is not deleted when the disk is released. For more information, see Configure automatic snapshots to be released with their disks.

Are snapshots deleted after I replace a system disk, release an instance, or release a disk?

Scenario

Replace system disk

Release instance

Release disk

Manual snapshot

Not affected.

Automatic snapshot

  • If the Delete Automatic Snapshots While Releasing Disk attribute is enabled for the old system disk, the automatic snapshots are released with the disk.

  • If the is disabled on the old system disk, the automatic snapshots are retained based on the retention period of the snapshot policy.

  • The automatic snapshot policy for the old system disk becomes invalid and needs to be reset.

If both the Release Disk with Source Instance and Delete Automatic Snapshots While Releasing Disk attributes are enabled, the disk is released with the instance, and the automatic snapshots are released with the disk.

  • If the Delete Automatic Snapshots While Releasing Disk attribute is enabled, the automatic snapshots are released with the disk.

  • If the Delete Automatic Snapshots While Releasing Disk attribute is disabled, the automatic snapshots are retained according to the retention period of the snapshot policy.

How do I delete a snapshot that was used to create an image or a disk?

  • You can force delete a snapshot that was used to create a disk. After you delete the snapshot, you can no longer perform operations that depend on the data state of the original snapshot, such as re-initializing a disk.

  • For a snapshot that was used to create a custom image, you must delete the image before you can delete the snapshot.

For more information, see Delete a snapshot.

When I delete a snapshot from a snapshot chain, why am I prompted that it is associated with "RequestId: xxx"?

Your snapshot was used to create a custom image. You must delete this custom image before you can delete the snapshot. For more information, see Delete a custom image.

If I use an automatic snapshot to create a custom image or a disk, will the snapshot policy fail to be executed?

No, it will not. You can associate an existing automatic snapshot policy with a disk. After the association, Alibaba Cloud automatically creates snapshots for the disk at the time points or intervals specified in the policy. This does not affect the execution of the automatic snapshot policy.

Can I apply multiple automatic snapshot policies to a single disk?

Yes, you can. By default, only one policy can be bound to a single disk. To bind multiple policies, see Apply multiple automatic snapshot policies to a single disk.

If I set the retention period to Permanently Retained when I create an automatic snapshot policy, can the snapshots still be deleted?

You can delete it.

  • If you no longer need a snapshot, you can manually delete it. For more information, see Delete a snapshot.

  • You can also enable the Delete Automatic Snapshots While Releasing Disk attribute for automatic snapshots. When you release the disk, its automatic snapshots are also deleted.

What do I do if my data disk disappears after I restart a Linux ECS instance or re-initialize its system disk?

  • Issue description: After you restart a Linux instance or initialize its system disk, you log on to the instance and run the df -h command to view attached disks. You find that the data disk is missing.

  • Cause:

    • Restarting the instance: If you did not write the mount information to the /etc/fstab file before restarting the instance, the instance does not automatically mount the data disk after the restart.

    • Re-initializing the system disk: Re-initializing the system disk resets the /etc/fstab file. The instance does not automatically mount the data disk after the system disk is re-initialized.

  • Solution:

    This solution uses the /dev/xvdb1 partition of a non-I/O optimized instance as an example. For a data disk attached to an I/O optimized instance that does not use the NVMe protocol, the disk device name is /dev/vd[b-z]. For a data disk attached to an I/O optimized instance that uses the NVMe protocol, the disk device name is /dev/nvmeXn1. Perform the operations based on your actual scenario.

    1. Run the mount /dev/xvdb1 command to re-mount the data disk.

    2. Run the mount command to view the file system type of the /dev/xvdb1 data disk partition.

    3. Assuming that the /dev/xvdb1 partition uses the ext3 file system, run the following command to write the data disk mount information to the /etc/fstab file.

      echo '/dev/xvdb1 /data ext3 defaults 0 0' >> /etc/fstab
    4. Restart the ECS instance from the console.

If I re-partition a data disk and then roll it back using a snapshot, how many partitions will the data disk have?

A disk rollback restores the disk to the state at the time the snapshot was created. If the disk had not been re-partitioned at that time, it does not have multiple partitions after the rollback.

Why do I receive the error message "The instance must be stopped to roll back the disk. Make sure that no snapshots are being created for the disk and the operating system has not been changed." when I roll back a disk?

  • Symptom: When you roll back a disk, you receive the error message "The instance must be stopped to roll back the disk. Make sure that no snapshots are being created for the disk and the operating system has not been changed."

  • Cause: This error is usually caused by an incorrect disk property or disk status.

  • Solution: You can troubleshoot the issue based on the instance status and related snapshot tasks.

    • Check whether the instance is stopped.

      You can only roll back a disk for a stopped instance. You can view the instance status on the Instances page in the console.

    • Check if the system disk has been replaced on the instance associated with the snapshot.

      If the operating system is replaced, the instance's system disk is automatically recreated from the new image, and the system disk ID changes. Therefore, the original snapshots of the instance can no longer be used for rollback. However, you can create a custom image from a snapshot and then replace the system disk with that custom image to restore the instance to the state of the snapshot. For more information, see Create a custom image from a snapshot and Replace the operating system (system disk).

    • Check whether a snapshot is being created for the disk to which the snapshot belongs.

      To ensure data consistency, you cannot perform a rollback operation if a snapshot task is in progress for the disk. On the Snapshots tab of the Instance Details page, check whether there are any snapshot tasks where the Progress is not 100%.

      To force stop the snapshot task to perform the disk rollback as soon as possible, select the snapshot and click Delete Snapshot to stop the task.

How can I quickly restore data from a snapshot after an ECS instance is released?

After an ECS instance is released, you can use the following methods to quickly restore its data:

  1. Create a custom image from a snapshot.

  2. Create an instance from a custom image or a shared image.

  3. Connect to the new ECS instance, check whether the data is fully restored, and then copy or further process the data.

    Important

    Creating a new instance may incur compute and storage fees. We recommend releasing the instance as soon as the data restoration is complete to avoid additional charges.

After I replace a system disk, can I use a snapshot of the previous system disk to roll back the new system disk?

No, you cannot.

Note

You can use the snapshots to create pay-as-you-go disks and then attach the disks to ECS instances for data restoration. After data is restored, we recommend that you release the disks as soon as possible. For more information, see Create a data disk from a snapshot, Attach a data disk, and Release a disk.

My previous instance was in the China (Hangzhou) region and had a snapshot for its data disk. After the instance expired and was released, I purchased a new instance in the China (Hangzhou) region. Can I roll back to the previous instance?

No, you cannot. To roll back a disk using a snapshot, you must roll it back to the original instance. However, you can use the snapshot of the previous data disk to create a new disk and attach it to the new instance. For more information, see Create a data disk from a snapshot and Attach a data disk.

Why can't I roll back a snapshot on my server?

You can check the snapshot status based on the error message received during the disk rollback. For common issues and solutions, see the disk rollback questions in Elastic Block Storage FAQ.

Can I create a custom image from a data disk snapshot?

No, you cannot. The disk that corresponds to the snapshot used to create a custom image must be a system disk.

How can I quickly restore data from a snapshot after an ECS instance is released?

After an ECS instance is released, you can use the following methods to quickly restore its data:

  1. Create a custom image from a snapshot.

  2. Create an instance from a custom image or a shared image.

  3. Remotely connect to the new ECS instance, check whether the data is fully restored, and then copy or further process the data.

    Important

    Creating a new instance may incur compute and storage fees. We recommend releasing the instance as soon as the data restoration is complete to avoid additional charges.

How do I re-attach a data disk after re-initializing the system disk of a Linux ECS instance?

In a Linux instance, re-initializing the system disk does not change the content of the data disk, but the mount information for the data disk is lost. Assume that before the system disk was re-initialized, the data disk partition attached to the instance was named /dev/vdb1 and the mount point was named /InitTest. After restarting the Linux instance, follow these steps to create a new mount point and mount the data disk partition.

  1. Run the mount command to view the data disk mount information.

    The result does not contain information about /dev/vdb1.

  2. Run the fdisk -l command to view the data disk partition information.

  3. Run the cat /etc/fstab command to view the original mount point of the /dev/vdb1 data disk partition.

  4. Run the mkdir /InitTest command to re-create the mount point for the data disk partition.

    The new mount point must be the same as the mount point of /dev/vdb1 before the system disk was re-initialized.

  5. Run the mount /dev/vdb1 /InitTest command to re-mount the data disk partition.

  6. Run the df -h command to view the mount result.

  7. Follow these steps to check whether the /dev/vdb1 data disk can be automatically mounted.

    1. Run the umount /dev/vdb1 command to unmount /dev/vdb1.

    2. Run the mount command to view the mount information.

      If the unmount is successful, the result does not contain information about /dev/vdb1.

    3. Run the mount -a command to automatically mount /dev/vdb1.

    4. Run the mount command to view the mount information.

      If the automatic mount is successful, the result contains information about /dev/vdb1.

What are the differences between manual snapshots and automatic snapshots?

Manual and automatic snapshots are essentially the same. They are both a complete copy of a disk's data at a specific point in time. However, they have the following differences:

  • Creation method

    • Manual snapshots must be created manually. You can go to the snapshot or disk page, customize the snapshot parameters as needed, and manually create a snapshot for a disk. For more information, see Create a snapshot.

    • Automatic snapshots rely on an automatic snapshot policy. After you create and enable an automatic snapshot policy, Alibaba Cloud automatically creates snapshots for the disk at the time points or intervals specified in the policy. For more information, see Create an automatic snapshot policy.

  • Snapshot source

    In the snapshot list, you can view the source of manual and automatic snapshots:

    • The Creation Method of an automatic snapshot is Automatic Snapshot.

    • The Creation Method of a manual snapshot is Manual Snapshot.

  • The snapshot names differ.

    • The name of a manual snapshot is customized when the snapshot is created.

    • The name of an automatic snapshot starts with auto2.0 and follows the format auto2.0_yyyyMMdd_SnapshotPolicyId, where:

      • auto2.0: Indicates an automatic snapshot, distinguishing it from a manual snapshot.

      • yyyyMMdd: The date the snapshot was created, where y is the year, M is the month, and d is the day.

      • SnapshotPolicyId: The ID of the automatic snapshot policy corresponding to the snapshot.

Note

The following constraints apply when using manual and automatic snapshots:

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

    A single disk supports the concurrent creation of both manual and automatic snapshots. However, there is a limit on the maximum number of concurrent snapshot creations. For more information, see Snapshot limits. If the number of concurrent snapshot creations for a disk reaches the limit, subsequent concurrent snapshot creation requests fail.

  • Legacy disks (standard SSDs, ultra disks, and basic disks)

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

    • At the time of an automatic snapshot creation, if a snapshot creation task (manual or automatic) is already in progress for the disk, the system does not create an automatic snapshot at that time. It creates the automatic snapshot at the next scheduled time.

    • If an automatic snapshot creation task is in progress for a disk, you must wait for it to complete before you can manually create a snapshot.

How do I change the name of a snapshot?

  1. Go to ECS console - Snapshots.

  2. Hover the mouse pointer over the snapshot name, click the icon shown in the figure, change the name, and then click Confirm.image

What is the relationship between a file system, a basic disk, and a snapshot?

You create a file system on a disk partition. The file system manages the disk space, and its management operations are ultimately converted into disk I/O requests. The disk records the status of data blocks and copies the data to OSS as needed. This process creates a snapshot. The relationship between the file system and a snapshot is shown in the following figure:

image
Note

In the figure above, any data block that has been written to is recorded in the snapshot, even if the corresponding file on the disk has been deleted. In a file system, "deleting" simply marks the file header to indicate that the space can be reused. It does not reduce the space occupied by the disk itself.

What are the similarities and differences between snapshots and images?

An image is a template used to create and start an instance. An instance is a virtual machine created based on an image and other configuration parameters. A snapshot is used to back up the data of an instance.

The following figure shows that a snapshot is a data backup of an instance at a specific point in time. You can create a custom image from ECS Instance 1 or its snapshot. You can then use the custom image to create another instance.

image

Both custom images and snapshots can be used for data backup, but they apply to different scenarios and have different features. Click to view the differences.

Main differences

Difference

Image

Snapshot

Definition

An image can be used to create a full backup of an instance's configuration, operating system, installed software, and data. For more information, see Use an image to back up and restore data.

A snapshot can be used to create a complete backup of the data on a single disk or a disk group (snapshot-consistent group) at a specific point in time. For more information, see ECS disaster recovery solutions.

Scenarios

  • Back up systems that will not be changed in the short term, such as application systems that have been published or updated. After creating a custom image from a fully installed and configured instance, you can use it to create new instances, for example, for batch application deployment.

  • Migrate systems and data, for example, migrating an instance from the classic network to a VPC.

    Restore a system across zones or regions. For example, you can specify a new zone when creating an instance from a custom image, or you can copy the image to another region and then create an instance across regions.

  • Periodically back up disk data.

    An automatic snapshot policy can be executed daily, weekly, or monthly to back up disk data according to a set schedule.

  • Temporarily back up disk data. For example:

    • For temporary system changes such as system updates or application releases, you can manually create a snapshot to back up the system before performing the changes to prevent operational errors.

    • Before scaling out a system disk, create a snapshot to back up data.

    • For disk data migration, create a snapshot of a disk to use as the base data for another disk.

Feature

  • An image can be directly used to create an instance.

  • An image always contains a data backup of the system disk. Whether it contains a data backup of a data disk depends on whether the source instance has a data disk, or whether you choose to add a data disk when creating the image from a snapshot.

  • An image can be used to replace the system disk of the current instance or other instances, or to create new instances.

  • A snapshot cannot be directly used to create an instance.

  • A snapshot can be a data backup of an instance's system disk or data disk.

  • A snapshot can only be used for data restoration of the current instance's disk.

Other contacts

  • When creating a custom image:

    • You can create a custom image from a system disk snapshot. For more information, see Create a custom image from a snapshot.

    • When you create a custom image from an ECS instance, a snapshot is created for each disk (system disk and data disks) of the instance. The created custom image contains the snapshots of all disks of the instance. For more information, see Create a custom image from an instance.

  • When deleting a custom image and a snapshot:

    • When you delete a custom image, you can choose to delete or retain the corresponding snapshots. For more information, see Delete a custom image.

    • When you delete a snapshot, the system checks if it is associated with an image. If it is, you must delete the image before you can delete the snapshot. For more information, see Delete a snapshot.

What are the differences between re-initializing a system disk and replacing a system disk (operating system)?

The main differences are shown in the following table:

Difference

Re-initialize system disk

Replace system disk (operating system)

Functional differences

Initialization restores the ECS instance to its initial state. The operating system remains unchanged.

Replaces the existing operating system with a different one.

Impact on the system disk

  • The old system disk is not released.

  • The system disk data is restored to its state at the time of creation. Applications installed and data generated after the instance was created are cleared. Back up your data beforehand.

  • The system disk ID, disk type, and IP address of the instance remain unchanged.

  • After the operating system is replaced, the old system disk is released.

  • All data on the system disk is cleared. Back up your data beforehand.

  • The system disk ID changes, but the disk type, ECS instance IP address, and ENI MAC address remain unchanged.

Impact on data disks

Data disks are not affected.

Data disks are not affected.

Impact on snapshots

  • Snapshots created from the system disk can be used to roll back the disk.

  • Both manual and automatic snapshots created from the system disk are retained.

  • The automatic snapshot policy settings remain effective and do not need to be reconfigured.

  • Snapshots of the old system disk cannot be used to roll back the new system disk, but they can be used to create a custom image.

  • Manual snapshots created from the old disk are not released.

  • For automatic snapshots, if the Delete Automatic Snapshots While Releasing Disk attribute is enabled for the old system disk, the automatic snapshots are automatically deleted. If the Delete Automatic Snapshots While Releasing Disk attribute is not enabled, they are automatically released upon expiration.

  • The automatic snapshot policy for the old system disk becomes invalid and needs to be reconfigured.

Billing

Re-initializing a system disk is free. The operating system remains unchanged, so the billable items do not change.

Replacing an operating system is free, but fees are charged in the following cases:

  • If the new image is a paid image, you are charged for the image. For more information, see Images.

  • If you increase the capacity of the system disk during the replacement, you are charged for the additional capacity. For more information, see Elastic Block Storage billing.