Before you roll back a disk, modify critical system files, or change an operating system, create a snapshot of the disk (system disk or data disk) to back up your data. If an unexpected issue or data loss occurs, you can restore data from the snapshot to ensure business continuity.
ENS provides two ways to create snapshots. You can choose either method or use both based on your business needs:
-
Manual creation: Suitable for one-time key node backups, such as safe-guarding before system upgrades or configuration changes. For the specific steps, see the Create a snapshot section below.
-
Automatic creation via auto snapshot policy: Suitable for routine periodic backup scenarios. The ENS system automatically triggers snapshot creation at preset start times, repeat dates, and retention durations without manual intervention. For details, see Auto Snapshot Policy.
Create a snapshot
You can create a snapshot from the Instance list page or the Disk list page.
-
If your disk is In Use, make sure the instance is in the Running or Stopped state.
-
Do not change the status of the ENS instance, such as stopping or restarting it, while a snapshot is being created. Otherwise, the snapshot creation fails.
-
Create snapshots during off-peak hours. When a snapshot is being created, the I/O performance of the disk is temporarily reduced.
-
Data that is written to the disk while the snapshot is being created is not included in the snapshot.
-
You cannot scale out a disk while a snapshot is being created for it. Wait for the snapshot creation to complete before you start the scale-out operation.
Create a snapshot from the instance list
-
Log on to the ENS console.
-
In the navigation pane on the left, choose .
-
On the Instance Management page, find the target instance and click Create Snapshot in the Actions column.
-
On the Create Snapshot page, configure the following parameters.
Configuration
Description
Snapshot Name
The name must be 2 to 128 characters in length. It must start with a letter or a Chinese character and can contain digits, colons (
:), underscores (_), and hyphens (-). It cannot start withhttp://orhttps://.Select Disk
Select the disk for which you want to create a snapshot. The disk can be a system disk or a data disk.
-
You can create a snapshot for only one disk at a time. If an instance has multiple disks attached, you must create snapshots for them one by one.
-
You can filter disks by disk ID and disk name.
-
-
Click OK. After the snapshot is created, you can view it on the Snapshot list page.
Create a snapshot from the disk list
-
Log on to the ENS console.
-
In the navigation pane on the left, choose .
-
On the Disk Management page, find the target disk, and in the Actions column, click Create Snapshot.
-
On the Create Snapshot page, configure the snapshot name.
-
Click OK. After the snapshot is created, you can view it on the Snapshot list page.
Roll back a disk using a snapshot
If data on a disk is lost due to accidental changes, a virus, or other issues, you can roll back the disk to the state captured in a snapshot.
-
You can only roll back snapshot data to the original disk. You cannot roll it back to another disk.
-
The disk that you want to roll back must have at least one completed snapshot. You cannot roll back a disk while a snapshot is being created for it.
-
If the disk is attached to an ENS instance, you must stop the instance before you can perform the rollback operation.
-
After you roll back a disk, all changes made after the snapshot was created are lost. This includes configuration data such as host configuration files, hostnames, Secure Shell (SSH) configurations, passwords, network settings, system software sources, and clock sources. Because these configurations are reverted to their state at the time of the snapshot, you must reconfigure this information to match your current needs.
-
If you scaled out a data disk after you created a snapshot of it, rolling back to that snapshot restores the disk to its capacity at the time of the snapshot. This means the space added during the scale-out is lost. To regain the larger capacity, you must scale out the disk again and then extend the file system on the instance.
-
Log on to the ENS console.
-
In the navigation pane on the left, choose .
-
On the Snapshot list page, find the target snapshot and click Roll Back Disk in the Actions column.
-
In the dialog box that appears, click OK.
Create a disk from a snapshot
You can create a new disk from a snapshot. The new disk contains the same data as the source disk at the time the snapshot was created. This is useful for cloning environments or backing up data. For more information, see Create and manage disks.
Create a custom image from a snapshot
To quickly replicate an environment, you can create a custom image from a system disk snapshot. A custom image contains the operating system and the software, configurations, and data installed on the ENS instance. New ENS instances created from this image share the same environment settings, enabling rapid replication of the system environment.
-
Custom images can be used on any ENS node because they are not associated with a specific node.
-
You must use a system disk snapshot. You cannot create a custom image from a data disk snapshot.
-
If the source ENS instance for the snapshot expires or is released, the custom image created from that snapshot is not affected. ENS instances created from that image are also not affected.
-
The time required to create a custom image depends on the size of the disk.
-
Log on to the ENS console.
-
In the navigation pane on the left, choose .
-
On the Snapshot list page, find the target snapshot, and in the Actions column, click Create Custom Image.
-
On the Create Custom Image page, configure the Image Name.
-
Click OK. After the image is created, you can view the new custom image on the Custom Image List page.
Delete a snapshot
When you no longer need a snapshot or the number of snapshots exceeds your quota, delete snapshots to free up space and avoid ongoing snapshot fees.
-
Deleting a snapshot only removes the data within that snapshot. It does not affect the disk from which the snapshot was created.
-
When you delete a snapshot, all data in the snapshot is permanently deleted and cannot be recovered. Proceed with caution.
-
If a disk was created from the snapshot, you must delete the disk before you can delete the snapshot.
-
If the snapshot was created by an auto snapshot policy, the system automatically deletes it when the retention duration configured in the policy expires. You do not need to manually clean it up. When the number of automatic snapshots for a single disk reaches the upper limit of 100, the system also automatically deletes the earliest-created automatic snapshot. If you need to release a specific automatic snapshot before it expires, you can manually delete it on the Disk Snapshot tab.
-
Log on to the ENS console.
-
In the navigation pane on the left, choose > Snapshot.
-
On the Snapshot list page, find the target snapshot and click Delete Snapshot in the Actions column.
-
In the dialog box that appears, click OK.
Copy a snapshot across edge zones
You can copy a snapshot to other ENS edge zones for cross-zone data backup, improving the reliability and flexibility of your backups. The copied snapshot has a different ID from the source snapshot and cannot be used to roll back the source disk.
Currently, the feature to copy snapshots across edge zones is available only by calling the OpenAPI or an SDK. This feature is not supported in the console. For more information, see Copy a snapshot across edge zones.
Copying snapshots across edge zones is suitable for the following scenarios:
-
DevOps (development and operations):
By copying snapshots across edge zones, you can quickly launch services or migrate business systems to a new edge zone, reducing O&M costs and improving availability.
-
Cross-edge-zone data backup:
For compliance audits or to improve business reliability, you can use copied snapshots to recover business systems in other edge zones during a disaster, reducing the recovery time objective (RTO) and recovery point objective (RPO).