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 misoperation, you can use the snapshot to restore data. This topic describes how to create and use a snapshot.

Precautions

Note The snapshot feature of Elastic Desktop Service (EDS) is in public preview. During the public preview, snapshots are free of charge. 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

Introduction

A snapshot is a stateful data file of a disk at a specific point in time. You can use snapshots 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. End users who are granted local administrator permissions can create and delete snapshots on clients of Elastic Desktop Service (EDS). The end users can also restore data from snapshots.
  • Automatically create snapshots: The system automatically creates snapshots for the system disk and data disk of a cloud desktop at 00:00:00 each day. The snapshots are retained only for three days. After the retention period elapses, the snapshots are automatically deleted. 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 "Create an automatic snapshot policy" section in this topic.
    The system automatically creates snapshots in the following scenarios:
    • If a cloud desktop is associated with an automatic snapshot policy, the system automatically creates snapshots for the cloud desktop at the points in time that are specified in the policy.
    • When the administrator updates a cloud desktop or a custom image, the system automatically creates snapshots for the cloud desktop to ensure that automatic rollback can be performed when an update task fails. If the update task is successful, the snapshots for the system disk of the original cloud desktop are deleted, and the snapshots for the data disk are retained.
    • When you change the image of a cloud desktop, the system automatically creates a snapshot if the cloud desktop uses a custom image and the image is deleted. After the image is changed, the system deletes the snapshot.
    • Before end users update cloud desktops on clients, the system automatically creates snapshots to ensure that automatic rollback can be performed when an update task fails. The system automatically creates up to three snapshots for a cloud desktop. The snapshots are retained only for three days. After the retention period elapses, the snapshots are automatically released.

Limits

The cloud desktop for which you want to create a snapshot must be in the Running state or Stopped state.

Manually create a snapshot

  1. Log on to the EDS console.
  2. In the left-side navigation pane, choose Desktops and Groups > Desktops.
  3. In the upper-left corner of the top navigation bar, select a region.
  4. On the Cloud Desktops page, find the cloud desktop for which you want to create a snapshot, and use one of the following methods to create a snapshot:
    • Find the cloud desktop for which you want to create a snapshot, click More in the Actions column, and then select Create Snapshot.
    • Click the ID of the cloud desktop for which you want to create a snapshot to go to the desktop details page. Click the Snapshots tab, and then click Create Snapshot.
  5. In the Create Snapshot panel, configure parameters.
    The following table describes the parameters.
    ParameterDescription
    DiskThe disk that you want to back up. Valid values: System and Data Disk, Only System Disk, and Only Data Disk.
    Snapshot NameThe name of the snapshot that you want to create. Enter a name that conforms to the naming conventions.
    DescriptionThe description of the snapshot that you want to create. Enter a description based on the requirements.
  6. Click Create 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 a policy, you can associate the policy with a specified cloud desktop. Then, the system automatically creates snapshots for the cloud desktop at the scheduled points in time.

  1. On the Snapshots page, click the Automatic Snapshot Policy tab.
  2. On the Automatic Snapshot Policy tab, click Create Policy.
  3. In the Create Policy panel, configure parameters based on your business requirements. The following table describes the parameters.
    ParameterDescription
    Policy NameThe name of the policy that you want to create. Enter a name that conforms to the naming conventions.
    Repeat DateThe date when snapshots are automatically created.
    Created AtThe points in time when snapshots are automatically created each day. The time must be in UTC+8.
    Retention PeriodThe period of time for which you want to retain the automatically created snapshots. Valid values: 1 to 180. Unit: days.

    If the number of snapshots that are automatically created for a cloud desktop reaches 30, the system deletes the earliest snapshots based on the points in time when the snapshots are created.

  4. In the message that appears, click OK.

    After you create the automatic snapshot policy, associate the policy with the cloud desktop for which you want the system to automatically create snapshots. After you associate a cloud desktop with the policy, the system automatically creates snapshots for the cloud desktop at the scheduled points in time.

    Procedure: On the Cloud Desktops page, find the cloud desktop that you want to manage, and choose More > Change Automatic Snapshot Policy. Then, perform the subsequent operations based on your business requirements.
    Note After you associate the cloud desktop with an automatic snapshot policy, click the ID of the cloud desktop. On the Basic Information tab of the desktop details page, you can view the associated snapshot policy.
    On the Automatic Snapshot Policy page, you can view the policy ID, creation time, and associated cloud desktop. You can also modify or delete the policy based on your business requirements.
    Warning
    • After you change an automatic snapshot policy, the new policy immediately takes effect on the associated cloud desktops.
    • After you delete an automatic snapshot policy, the system does not automatically create snapshots for the associated cloud desktops. Proceed with caution.

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.

Warning You cannot undo restoration. 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.

Precautions

  • A snapshot is available.
  • The cloud desktop whose disk you want to restore is in the Stopped state. For more information, see Start, stop, restart, and release cloud desktops.
  • 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

  1. On the Cloud Desktops page, find the cloud desktop for which you want to restore data, and click the ID of the cloud desktop.
  2. On the desktop details page, click the Snapshots tab. Find the snapshot that you want to use and click Restore Desktop in the Actions column.
    If the cloud desktop is not stopped, you are redirected to the Stop step in the Restore Desktop panel. Click OK. After you stop the cloud desktop, you can perform the next step.
  3. In the Restore Desktop panel, verify the displayed information about the snapshot, and click Restore Desktop.
    Warning You 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 snapshots that you no longer require. You can delete snapshots that are manually and automatically created. When the specified retention period of snapshots that are automatically created elapses, the snapshots are automatically deleted.

Warning 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.
  1. You can use one of the following methods to delete a snapshot:
    • Delete a snapshot on the Cloud Desktops page
      1. On the Cloud Desktops page, find the cloud desktop whose snapshot you want to delete, and click the ID of the cloud desktop.
      2. On the desktop details page, click the Snapshots tab. Find the snapshot that you want to delete and click Delete in the Actions column.
    • Delete a snapshot on the Snapshots page

      On the Snapshots page, find the snapshot that you want to delete, and click Delete in the Actions column.

  2. In the message that appears, click Confirm.

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 about specific operations, see Create an image by using a snapshot.