This topic describes how to roll back a disk by using a snapshot. When the system does not respond or an incorrect operation is performed, you can roll back a disk to a previous version by using its snapshots. Before you roll back a disk, you must have created at least one snapshot for the disk. You can roll back both system disks and data disks. When you roll back a system disk, the instance is automatically bound with the current SSH key pair or the username and password combination.
Prerequisites
- A snapshot of the disk to be rolled back is created, and no new snapshot is being
created for the disk. For more information, see Create a normal snapshot or Create a local snapshot.
Warning The rollback operation is irreversible. After a disk is rolled back, the data from the creation of the snapshot to when the disk is rolled back is lost. To avoid data losses caused by incorrect operations, we recommend that you create a snapshot for the current disk before you roll back the disk.
- The disk has not been released.
- After you replace the system disk, snapshots of the previous system disk cannot be used to roll back the new system disk.
- If you use a disk to create a dynamic extended volume or redundant array of independent disks (RAID), you must stop all I/O operations on the disk before you roll back the disk.
- The disk is attached to an ECS instance and the instance is in the Stopped state.
For more information, see Attach a data disk and Stop an instance.
Note A pay-as-you-go instance in a VPC may not be restarted after its disk is rolled back if the No Fees for Stopped Instances (VPC-Connected) feature is enabled. We recommend that you select Retain Instance and Continue Charging After Instance Is Stopped when you stop the instance.
Roll back a disk by using a snapshot
You can roll back a disk from the Snapshots or Instances page. The following example shows how to roll back a disk from the Instances page.
(Optional) Synchronize data after a disk is rolled back
