You can create a snapshot to back up and restore disk data. Before you perform key operations on the system, such as modification of a key system file, you can create a snapshot. If system errors or faults occur due to misoperations, you can use the snapshot to restore data. This topic describes how to create and use a snapshot.
Limits
The snapshot feature of cloud computers is in public preview. You can use snapshots free of charge during the public preview period. When the public preview ends, you are charged for using snapshots. Take note that billing announcements will be released in advance. The most recent billing announcement shall prevail.
Create a snapshot
Overview
A snapshot is a stateful data file of a disk at a specific time point. Snapshots can be used to back up and restore data.
Snapshots can be manually created or automatically created.
Manually create snapshots: You can create a snapshot at a specific point in time based on your business requirements. When you create a snapshot, you can specify a disk scope. If you grant the administrator permissions to an end user, the end user can create, restore, and delete snapshots on the Alibaba Cloud Workspace client .
Automatically create a snapshot: By default, the system automatically creates a snapshot for the system disk and data disk of each cloud computer at 00:00 every day. The snapshot is retained for only three days and automatically deleted after three days. You can also create an automatic snapshot policy based on your business requirements. For information about how to create an automatic snapshot policy, see the following section.
The system also automatically creates snapshots for cloud computers in the following scenarios:
For cloud computers to which an automatic snapshot policy is attached, the system automatically creates snapshots based on the time specified by the policy.
Before the administrator upgrades the cloud computer or custom image, the system automatically creates a snapshot. This way, the system can automatically roll back if the upgrade fails. If the upgrade succeeds, the system disk snapshot of the original cloud computer is deleted and the data disk snapshot is retained.
When you change the image of a cloud computer, the system automatically creates a snapshot if the image is a custom image that has been deleted. After the image is changed, the system automatically deletes the snapshot.
Before an end user upgrades the cloud computer on the Alibaba Cloud Workspace client, the system automatically creates a snapshot, which can be used to perform automatic rollback if the upgrade fails. In this case, you can create up to three snapshots for a cloud computer. The snapshots can be retained for only three days. The system automatically releases the snapshots three days later.
Limits
The cloud computer must be in the Running or Stopped state.
Manually create a snapshot
Log on to the WUYING Workspace (Pro Edition) console.
In the left-side navigation pane, choose
.In the upper-left corner of the top navigation bar, select a region.
On the Cloud Computers page, use one of the following methods to create a snapshot:
In the Actions column, click the icon and click Create Snapshot.
Click the ID of the cloud computer to go to the details page. Click the Snapshots tab and click Create Snapshot.
In the Create Snapshot panel, configure the parameters.
The following table describes the parameters.
Parameter
Description
Disk
The disk that you want to back up. Valid values: System and Data Disk, Only System Disk, and Only Data Disk.
Snapshot Name
Enter a name that conforms to the naming conventions.
Description
The description of the snapshot. Enter a description based on the requirements.
Click OK to create the snapshot.
On the Snapshots page, you can view the creation progress of the snapshot. When the status of the snapshot changes from In Progress to Successful, the snapshot is created.
Create an automatic snapshot policy
After you configure an automatic snapshot policy, the system automatically creates snapshots at the specified points in time on specified dates. You can also specify a retention period for the automatically created snapshots. After you create an automatic snapshot policy, you can attach the policy to a specified cloud computer to back up the data of the cloud computer at regular intervals.
Log on to the WUYING Workspace (Pro Edition) console.
In the left-side navigation pane, choose .
In the upper-left corner of the top navigation bar, select a region.
On the Snapshots page, click Automatic Snapshot Policy.
On the Automatic Snapshot Policy tab, click Create Policy.
In the Create Policy panel, set the following parameters.
Parameter
Description
Policy Name
Enter a name that conforms to the naming conventions.
Repeat Date
The day in a week when snapshots are automatically created.
Created At
The points in time when snapshots are automatically created each day. The time must be in UTC+8.
Retention Period
The period of time for which you want to retain the automatically created snapshots. Valid values: 1 to 180. Unit: days.
If the number of automatically created snapshots that are associated with cloud computer reaches 30, the system deletes the oldest snapshots based on the creation time of the snapshots.
Click Confirm.
After you create an automatic snapshot policy, you can attach it to specified cloud computers. After that, the system creates snapshots for the cloud computers based on the automatic snapshot policy.
Procedure: On the Cloud Computers page, find the cloud computer to which you want to attach the automatic snapshot policy, click the icon in the Actions column, and then select Change Automatic Snapshot Policy.
NoteAfter you attach an automatic snapshot policy to a cloud computer, you can view the attached policies by using the following method: Click the cloud computer ID and view the custom snapshot policy attached to the cloud computer on the Basic Information tab.
On the Automatic Snapshot Policy tab, you can view the policy IDs, the time when the snapshots are created, and the cloud computers that are attached to the policy. You can also modify or delete the policies based on your business requirements.
WarningAfter you modify an automatic snapshot policy, the modified automatic snapshot policy immediately takes effect on the associated cloud computers.
After you delete an automatic snapshot policy, snapshots are no longer automatically created for the associated cloud computers. Exercise caution when you perform this operation.
Restore data
When data on a disk is lost due to a system failure or an operation error, you can use a snapshot to restore the disk data to the point in time when the snapshot was created.
Restoration cannot be undone. Proceed with caution. After you restore data on a disk, the disk is restored to the status at the point in time when the snapshot was created. Data that is generated between the snapshot creation time and the current time is lost. Before you restore a disk from a snapshot, make sure that you back up important data.
Limits
A snapshot is available.
The cloud computer is stopped. For more information, see Start, stop, restart, or release a cloud computer.
The data that you want to restore is backed up.
You can create a snapshot and save the snapshot as a backup or manually back up the data to another disk for restoration.
Procedure
On the Cloud Computers page, click the ID of the cloud computer whose data you want to restore.
On the Snapshots tab, find the ID of the snapshot that you want to use to restore data and click Restore Cloud Computer in the Actions column.
If the cloud computer is not shut down, a message is displayed. Click OK. After the cloud computer is shut down, you can proceed to the next step.
In the Restore Cloud Computer panel, verify the displayed information about the snapshot and click Restore Cloud Computer.
WarningYou can restore the data of a single disk each time. Do not perform other operations on the disk during the restoration. After the restoration is complete, the data of the disk is restored to the point in time when the snapshot was generated.
When the disk data is restored, a message prompts you to check the status of data restoration.
Delete a snapshot
You can manually delete the snapshots that you no longer require. You can delete snapshots that are manually or automatically created. When the specified retention period of snapshots that are automatically created elapses, the snapshots are automatically deleted.
When you delete snapshots, you can check region-specific snapshots and determine whether to delete the snapshots based on your business requirements. After a snapshot is deleted, you cannot perform operations that require the data in the snapshot. Proceed with caution.
You can use one of the following methods to delete a snapshot:
Delete a snapshot on the Cloud Computers page
On the Cloud Computers page, find the cloud computer whose snapshots you want to delete and click the ID of the cloud computer.
On the cloud computer details page, click the Snapshots tab. Find the ID of the snapshot that you want to delete and click Delete in the Actions column.
In the message that appears, click Confirm.
Delete a snapshot on the Snapshots page
On the Snapshots page, find the ID of the snapshot that you want to delete, click Delete in the Actions column, and then click Delete.
What to do next
If a snapshot is created based on a system disk, you can create an image from the snapshot. For more information, see Create an image.