If you have created snapshots from a disk, you can roll back the disk to restore it to its state at a specific point in time. The operations described in this topic apply to system disks and data disks.
- You have an existing snapshot of the disk, and you are not in the process of creating a snapshot of the disk.
- The disk has not been released.
- If you have changed the system disk, snapshots of the previous system disk cannot be used to roll back the new system disk.
- The disk has been attached to an ECS instance, and the instance is in the Stopped state.
Notice If the feature of No fees for stopped instances (VPC-Connected) is enabled for your pay-as-you-go instance, set the Stop Mode in the Stop Instance dialog box to Retain Instance and Continue Charging After Instance is Stopped when you stop the instance. If you do not do this, you may not be able to restart the instance after the disk is rolled back. For more information, see No Fees for Stopped Instances (VPC-Connected).
- The rollback operation is irreversible. After rollback is completed, the data before the rollback cannot be restored. Use caution when you perform this operation.
- After a disk is rolled back, the data from the time when the snapshot is created to the time when the rollback is performed is lost.
- After a system disk is rolled back, the SSH key pair or password used by the instance is automatically bound to the new system disk.
- Log on to the ECS console.
- In the left-side navigation pane, choose .
- In the top navigation bar, select a region.
- Find the ECS instance that is in the Stopped state and click the instance ID to access the Instance Details page.
- In the left-side navigation pane, click Snapshots.
- Select the target snapshot and click Rollback Disk in the Actions column.
- In the message that appears, click OK.
What to do next
- If you resize a disk after you create a snapshot of the disk, the size of the disk is also rolled back after you roll back the disk. To make the disk revert to the size before the rollback, you must log on to the instance to resize the file system again. For more information , see the following topics:
- To retain important or partial data generated from the time when the snapshot is created to the time when the rollback is performed, you can create a data disk from the latest snapshot generated during that period, attach the new data disk to the ECS instance, and then synchronize the data you want to the ECS instance.