All Products
Search
Document Center

Cloud Backup:Backup and restoration

Last Updated:Apr 30, 2024

After you bind a subscription instance of ECS Backup Essential Edition to an Elastic Compute Service (ECS) instance, you can back up the entire ECS instance or back up specific files and databases from the ECS instance. This topic describes how to add an ECS instance for backup and restoration.

Supported backup solutions

When you create an ECS backup job, you can select the source ECS instance, ECS files, and an ECS-hosted database.

Backup source

Frequency

Backup content

ECS files

ECS files are backed up once a day, and backup data is retained for 30 days.

No backup

All directories

Specified directories

ECS-hosted database

No backup

MySQL, Oracle, or SQL Server database

ECS instance (including disks)

No backup

All disks

Specified disks

Purposes of ECS instance

  • Backup and Restore

    The added ECS instance can be used as a backup source or a restoration destination. You must purchase a subscription instance of ECS Backup Essential Edition and bind the subscription instance to the ECS instance.

  • For Restoration Only (restore-only-mode)

    The added ECS instance can be used as a restoration destination only. You do not need to purchase a subscription instance of ECS Backup Essential Edition and bind the subscription instance to the ECS instance. This type of instance can also be converted to a backup and restore instance after it is added.

Prerequisites

  • An ECS instance to be backed up is available. The instance is in the Running state.

  • ECS backup and ECS database backup depend on Cloud Assistant Agent. Therefore, you must install Cloud Assistant Agent on the ECS instance to be backed up. For more information about Cloud Assistant Agent, see Overview.

  • The source ECS instance, ECS files, and ECS-hosted databases are not protected by using another backup feature of Cloud Backup. If they are protected by using another backup feature of Cloud Backup, using ECS Backup Essential Edition for the backup will fail due to the conflict. If you want to use ECS Backup Essential Edition for the backup, you must first disable other backup features.

  • A subscription instance of ECS Backup Essential Edition is purchased. After you bind the subscription instance of ECS Backup Essential Edition to the ECS instance, you can back up the ECS files, the ECS instance (including disks), and the ECS-hosted database. You can back up only one of MySQL, Oracle, and SQL Server databases at a time. For more information, see Purchase a subscription instance of ECS Backup Essential Edition.

Create an ECS backup job

  1. Log on to the Cloud Backup console.

  2. In the left-side navigation pane, choose Backup > ECS Backup Essential Edition.

  3. In the top navigation bar, select a region.

  4. On the ECS Backup Essential Edition page, click Add ECS Backup.

  5. In the Add ECS Backup panel, select the ECS instance that you want to back up and configure the backup parameters.

    1. Select the ECS instance that you want to back up, then click Next.image.png

    2. Configure the backup parameters. Then, click OK.

      Parameter

      Description

      Basic Settings

      • Selected ECS Instance: The ECS instance to be backed up is selected by default.

      • ECS Usage

        • Backup and Restore

          The added ECS instance can be used as a backup source or a restoration destination. You must purchase a subscription instance of ECS Backup Essential Edition and bind the subscription instance to the ECS instance.

        • For Restoration Only

          The added ECS instance can be used as a restoration destination only. You do not need to purchase a subscription instance of ECS Backup Essential Edition and bind the subscription instance to the ECS instance. This type of instance can also be converted to a backup and restore instance after it is added.

      • Bind Subscription Instance: Select the subscription instance of ECS Backup Essential Edition that you purchased. If you have not purchased a subscription instance of ECS Backup Essential Edition, click Purchase. For more information, see Purchase a subscription instance of ECS Backup Essential Edition.

      • Start Time: Specify the start time of the backup. When the daily backup execution time is reached, Cloud Backup runs the backup job.

      Backup Content (required only if the ECS Usage parameter is set to Backup and Restore)

      File

      Configure the directory for backing up ECS files.

      • No Backup: ECS files are not backed up.

      • All Files: All ECS files are backed up, and system folders are excluded. You can click the question mark icon to obtain the details about the excluded system folders.

      • Specified Folders: Files in the specified folders on the ECS instance are backed up. You must specify Source Paths and Backup Rule. You must specify source paths based on the following rules:

        • If you do not use wildcards (*), you can enter up to 20 source paths.

        • If you use wildcards (*), you can enter only one path. You must specify the path in the /*/* format.

        • Only absolute paths are supported, such as the paths that start with /, \\, C:\, or D:\.

        • If you use Universal Naming Convention (UNC), Volume Shadow Copy Service (VSS) paths and wildcards (*) are not supported. You cannot exclude files from the backup job.

        • Backup Rule: Configure the rule based on which files are backed up. The following list describes the rules:

          • Include All Files: All files in the path are backed up.

          • Include Files or Exclude Files: After you enter the files to be backed up in Enter Paths, Cloud Backup backs up the files specified in the path.

            Enter one path in each line, such as /home/user or C:\Users.

            Note

            Specify a subpath relative to the source path:

            1. If you specify a subpath that starts with /, Cloud Backup combines the subpath and the source path into a complete path. The backup rule is then applied to all the files and directories stored in the source path.

            2. If you specify a subpath that does not start with /, Cloud Backup uses the subpath as a condition to match files. The backup rule is applied to all files and directories that match the condition in the source path.

      Database

      Configure the type of the ECS-hosted database to be backed up and the username and password used to manage the database. You can select only one type of database deployed on an ECS instance.

      • No Backup: Select this option if you do not back up an ECS-hosted database.

      • MySQL: Select this option if you want to back up an ECS-hosted MySQL database. You must also configure the Database Account and Password parameters that are used to manage the database.

        The minimum permission set of the user is RELOAD, LOCK TABLES, REPLICATION, and PROCESS. For example, if you use the hbr_backup_admin account to log on as a root user, you can run the following commands to grant permissions:

        grant RELOAD, REPLICATION CLIENT, REPLICATION SLAVE, LOCK TABLES, PROCESS on *.* to 'hbr_backup_admin'@'%';
        grant BACKUP_ADMIN on *.* to'hbr_backup_admin'@'%';
        flush privileges;# Refresh the permissions.

        Limits are imposed on the supported database versions and backup features. For more information, see the "Supported database versions" section in Overview (ECS database backup).

      • Oracle: Select this option if you want to back up an ECS-hosted Oracle database. You must also configure the Database Account and Password parameters that are used to manage the database.

      • SQL Server: Select this option if you want to back up an ECS-hosted SQL Server database. You must also configure the Database Account and Password parameters that are used to manage the database.

      ECS Instance

      • No Backup: The ECS instance is not backed up.

      • All Disks: All disks on the ECS instance are backed up.

        Note

        The fee of the snapshot size used in this feature is included into your snapshot service bill. For more information, see Billing methods and billable items.

      • Specified Disks: Specified disks are backed up.

      Restoration Type (required only if the ECS Usage parameter is set to For Restoration Only)

      Important

      Cloud Backup automatically installs a client on the ECS instance for subsequent restoration. You are not charged for using the client.

      File

      Specify whether you need to restore files from the ECS instance.

      • Does Not Require Restoration: Select this option if you do not need to restore ECS files.

      • Requires Restoration: Select this option if you need to restore ECS files.

      Database

      Specify whether you need to restore a database from the ECS instance.

      • Does Not Require Restoration: Select this option if you do not need to restore an ECS-hosted database.

      • MySQL: Select this option if you need to restore an ECS-hosted MySQL database. You must also configure the Database Account and Password parameters.

      • Oracle: Select this option if you need to restore an ECS-hosted Oracle database. You must also configure the Database Account and Password parameters.

      • SQL Server: Select this option if you need to restore an ECS-hosted SQL Server database. You must also configure the Database Account and Password parameters.

After you create the ECS backup job, the backup status changes to Initializing and Pending in sequence.

If ECS Usage is set to For Restoration Only, the For Restoration Only tag appears in the ECS instance list. This indicates that the ECS instance can be used as a restoration destination without the need to bind a subscription instance of ECS Backup Essential Edition.

image.png

Backup succeeded

When the daily backup execution time is reached, Cloud Backup runs the backup job. If Backup Status is Successful, the backup job is completed on the current day. You can view the backup points in the backup history.

image.png

If ECS files are accidentally deleted, an ECS-hosted database is corrupted, or the ECS instance (including disks) needs to be restored, you can click a historical backup point to create a restore job.

Create a restore job

Restore and view files

Restore ECS files

On the File Backup tab, select a historical backup point and restore the files from the backup point to the ECS instance.

image.png

  1. Click an available historical backup point, and then click Restore.

  2. In the Create Restore Job dialog box, perform the following steps:

    1. Configure the Restore Items parameter and click Next.

      The following table describes the valid values of the parameter.

      Parameter

      Description

      Restore Items

      The files or folders that you want to restore.

      • Include All Files: All files on the client are restored.

      • Include Files: Select the files or folders that you want to restore.

        You can also click Enter Paths to specify the files that you want to restore. In the text box, enter the paths to the files or folders that you want to restore. Cloud Backup restores files on the client based on the specified restore policy.

        In the text box, enter one path in each line and make sure that the first folder in each path is the lowest-level folder in the directory that is backed up. For example, if the files in folder/test/data are backed up, and you want to restore the file.txt and abc.png files in the data folder, specify the following paths:

        /data/file.txt
        /data/abc.png
      • Excluded Files: Select the files or folders that you do not want to restore.

        You can also click Enter Paths to specify the files that you want to restore. In the text box, enter the paths to the files or folders that you want to restore. Cloud Backup restores files in the client based on the specified restore policy.

        In the text box, enter one path in each line and make sure that the first folder in each path is the lowest-level folder in the directory that is backed up. For example, if the files in folder/test/data are backed up, and you want to restore the file.txt and abc.png files in the data folder, specify the following paths:

        /data/file.txt
        /data/abc.png
    2. Specify a destination for data restoration and click Next.

      Note
      • Restore data to the source ECS instance: You can restore data to the source ECS instance that is bound with the subscription instance of ECS Backup Essential Edition.

      • Restore data to a new ECS instance: You can restore data to an ECS instance that is not bound with the subscription instance of ECS Backup Essential Edition and whose ECS Usage is set to For Restoration Only.

      image.png

    3. Specify the recovery path and click Start Restore.

      Parameter

      Description

      Restore Path Type

      • Specify Path: restores files to the path that you specify.

      • Origin Path: restores files to the path from which the files are backed up.

      Destination Path

      This parameter is required only if you set the Restore Path Type parameter to Specify Path. This parameter specifies the path to which the files are restored.

      File Conflict Policy

      • Skip This File

      • Overwrite The File (default value)

      • Keep Latest File

    After the restore job is created, click the backup point. The restore job is in the Running state. image.png

    Move the pointer over Restore Jobs to view the progress of the restore job.

    image.png

View ECS files

On the File Backup tab, select a historical backup point and view the ECS files that are backed up at the backup point.

image.png

Restore a database

Restore a database

On the Database Backup tab, select a historical backup point and restore the database files at the point to the source database on the ECS instance.image.png

  1. Click an available historical backup point, and then click Restore.

  2. In the Create Restore Job panel, configure the parameters and then click Next. The following table describes the parameters.

    Parameter

    Description

    Retry Time

    The time interval between two consecutive reconnection attempts if the database is disconnected during restoration. Unit: minutes.

    Speed Limit

    The maximum size of data that is restored per second. Unit: MB/s.

  3. Configure the database to be restored and click Create.

    Important
    • Restore the database to the source ECS instance: You can restore the database to the source ECS instance that is bound with the subscription instance of ECS Backup Essential Edition.

    • Restore the database to a new ECS instance: You can restore the database to an ECS instance that is not bound with the subscription instance of ECS Backup Essential Edition and whose usage is For Restoration Only.

After you create a restore job, the job automatically starts. Click the backup point. The restore job is in the Running state. image.png

Move the pointer over Restore Jobs to view the progress of the restore job.

image.png

Restore an ECS instance

Restore an ECS instance (rollback)

On the Instance Protection tab, select a historical backup point and roll back the system disk of the ECS instance.image.png

  1. Click an available historical backup point, and then click Restore.

  2. In the Confirm message, read the notes and click Confirmation.

    Important

    You can restore an ECS instance only when the ECS instance is stopped and no backup is being created for the ECS instance. After a protected disk is restored to a specified point in time, the data that is written to the disk after the point in time is cleared. Proceed with caution.

    Parameter

    Description

    Start the ECS instance after the rollback

    If you select this option, the ECS instance automatically starts after the rollback is complete.

After the restore job is created, the system starts to restore the ECS instance. Click the backup point. The restore job is in the Running state.

Move the pointer over Restore Jobs to view the progress of the restore job.

image.png

Clone an ECS instance

On the Instance Protection tab, select a historical backup point and clone the data at the point as a new ECS instance.image.png

  1. Click an available historical backup point, and then click Clone.

  2. In the Create ECS Instance from Backup panel, enter a hostname and an instance name, and then select a virtual private cloud (VPC), a vSwitch, and an instance type.

  3. Click Create.

    Note

    You are charged for the new ECS instance based on the billing rules of ECS. For more information, see Pay-as-you-go.

    After the job is created, move the pointer over Restore Jobs to view the progress of the restore job.

Restore a disk (rollback)

On the Disk Protection tab, select a historical backup point and restore the data at the point as a new ECS disk.image.png

  1. Click an available historical backup point, and then select Restore.

  2. In the Confirm message, read the notes and click Confirmation.

    Important

    You can roll back a disk only when the ECS instance is stopped and no backup is being created for the disk. After an ECS disk is rolled back to a specified point in time, the data that is written to the disk after the point in time is cleared. Proceed with caution.

After the restore job is created, move the pointer over Restore Jobs to view the progress of the restore job.image.png

Clone a disk

On the Disk Protection tab, select a historical backup point and clone the data at the point as a new disk.image.png

  1. Click an available historical backup point, and then click Clone.

  2. In the Create Disk from Backup panel, select the ECS instance to which the new disk is attached. Click Next.

  3. On the Set Mount Parameters tab, select a disk type and click Create.

    Note

    If you create an ECS disk, you are charged based on the billing rules of ECS disks. For more information, see Pay-as-you-go.

After the job is created, move the pointer over Restore Jobs to view the progress of the restore job.image.png

Convert an ECS instance to an ECS instance for backup

The steps to convert an ECS instance of the For Restoration Only type to a subscription instance of ECS Backup Essential Edition are the same as those in Create an ECS backup job. The main operation is to bind a subscription instance of ECS Backup Essential Edition when you create an ECS backup job. Therefore, you must purchase a subscription instance before you perform the conversion. For more information, see Purchase a subscription instance of ECS Backup Essential Edition.

image.png

After the conversion is complete, the ECS instance of the For Restoration Only type can be used as a backup source or a restoration destination.

FAQ

If the Backup Status is abnormal, you can resolve the issue based on the following instructions.

  • Error: The ECS instance is not running.

    The ECS instance is not running. Log on to the Elastic Compute Service to start the ECS instance and try again.

  • Failed: ECS Released

    • If the ECS instance is released as expected, choose More > Unbind to delete the backup.

      Important

      If you unbind the ECS instance, all the backups generated during the binding period are deleted. Proceed with caution.

    • If the ECS instance is released unexpectedly, we recommend that you use the ECS instance backup feature of Cloud Backup to check whether the ECS instance can be restored. For more information, see Restore an ECS instance.

  • Failed: The prepaid instance of ECS Backup Essential Edition has expired.

    The subscription instance of ECS Backup Essential Edition that you purchased has expired and cannot be used for ECS backup. We recommend that you purchase a new subscription instance of ECS Backup Essential Edition. For more information, see Purchase a subscription instance of ECS Backup Essential Edition.

  • Failed: The backup data volume exceeds the quota of ECS Backup Essential Edition.

    The backup data volume exceeds the quota of ECS Backup Essential Edition. We recommend that you perform the following operations:

Related operations

After you create an ECS backup job, you can perform the following operations in the Actions column on the ECS Backup Essential Edition page.

Operation

Description

Edit

You can modify the ECS backup job if the created ECS backup job does not meet your expectations. For example, you can modify the backup execution time.

Suspend Backup

You can suspend the ECS backup job. After you suspend the backup job, the backup job is no longer run at a specific time every day.

Unbind

You can unbind the subscription instance of ECS Backup Essential Edition from the ECS instance.

Important

If you unbind the ECS instance, all the backups generated during the binding period are deleted. Proceed with caution.

Alert Settings

You can specify the method that is used to send alert notifications if the Cloud Backup client, a backup job, or a restore job is abnormal.

  • Disabled: The Cloud Backup client does not send alert notifications.

  • Notify Alibaba Cloud Account: The Cloud Backup client sends alert notifications to the owner of the Alibaba Cloud account by using emails.

  • Custom: If you select this option, you must select one or more alert contacts or alert contact groups. If an alert is triggered, the Cloud Backup client sends alert notifications to the selected alert contacts or alert contact groups. For more information, see Manage alert contacts.

References