All Products
Search
Document Center

Cloud Backup:Back up files from an ECS instance

Last Updated:Sep 29, 2024

To prevent data loss caused by accidental deletion of files or server poisoning, we recommend that you use Cloud Backup to back up all directories and files on your Elastic Compute Service (ECS) instance. Cloud Backup allows you to configure flexible backup policies to back up data to the cloud. You can view and restore data at any time. This topic describes how to use Cloud Backup to back up files from an ECS instance.

Prerequisites

Cloud Backup is activated. You are not charged for activating Cloud Backup. If you use the ECS file backup feature of Cloud Backup, you are charged for client usage and storage usage. For more information, see Billing of the ECS file backup feature.

Usage notes

  • To achieve the optimal backup performance, we recommend that you run a Cloud Backup client on a host with the following configurations: 64-bit CPU with two or more cores and more than 8 GB available memory.

  • The volume of data that can be backed up depends on the available memory. For a host with 4 GB available memory, a maximum of one million files, up to 8 TB in total, can be backed up. If you want to back up tens of millions of files, we recommend that you prepare 16 GB available memory.

  • If you create a backup plan or bind a backup policy for the first time, Cloud Backup automatically creates a service-linked role named AliyunServiceRoleForHbrEcsBackup to obtain the permissions to access related resources. In the dialog box that appears, assign the role as prompted. For more information, see Service-linked roles for Cloud Backup.

  • A Cloud Backup client for ECS must be used together with Cloud Assistant.

    • If you purchased the ECS instance before December 1, 2017, you must manually install Cloud Assistant Agent. For more information, see Install Cloud Assistant Agent.

    • If you purchased the ECS instance on or after December 1, 2017, Cloud Assistant Agent is pre-installed.

Create a backup plan to periodically back up ECS files

  1. Log on to the Cloud Backup console.

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

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

  4. On the ECS Instances tab of the ECS File Backup page, find the ECS instance and click Back Up in the Actions column.

  5. In the Create Backup Plan panel, configure the parameters and click OK. The following table describes the parameters.

    Important
    • If the region that you select supports backup policies, you can set a backup plan only by associating it with a backup policy. Cloud Backup periodically backs up ECS files based on the backup policy.

    • To view the regions that support backup policies, click Policy Center in the left-side navigation pane of the Cloud Backup console. For more information about how to create a backup policy, see Create a backup policy.

    Parameter

    Description

    Backup Folder Rule

    Specify the directory to be backed up. Cloud Backup backs up all files and subdirectories of the directory.

    Select All Folders or Specified Folders.

    • If you select All Folders, you must turn on or off Exclude System Folders.

      • If you turn on Exclude System Folders, the system folders in Windows and Linux are not backed up.

        You can move the pointer over the 问号 icon to the right of Exclude System Folders to view the system folders in Windows and Linux.

      • If you turn off Exclude System Folders, all folders are backed up.

    • If you select Specified Folders, you must specify the Source Paths parameter. To specify multiple source paths, click Add Folder.

      You must specify source paths based on the following rules:

      • If you do not use wildcards (*), you can enter up to eight 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 paths that start with /, \\, C:\, or D:\.

      • If you use Volume Shadow Copy Service (VSS), you can enter only one path. UNC paths and wildcards (*) are not supported. You cannot exclude files from the backup plan.

      • If you use Universal Naming Convention (UNC), VSS paths and wildcards (*) are not supported. You cannot exclude files from the backup plan. If a UNC path is specified, Cloud Backup does not back up the access control list (ACL) of Windows.

    Exclude System Folders

    If you turn on Exclude System Folders, system folders are not backed up.

    Backup File Type

    Select All Types or Specified Type.

    • If you select All Types, all types of files are backed up.

    • If you select Specified Type, you must select the types of the files that you want to back up from the Select File Type drop-down list.

    Backup Policy

    Select a proper backup policy from the drop-down list.

    Cloud Backup automatically backs up data sources based on the backup policy that you configure. Backup policies help you flexibly manage data sources. A backup policy includes the following settings: backup vault encryption method, backup interval, retention period, cross-region replication policy, automatic archiving of backup data, and virus detection for backup points.

    If the default backup policy does not meet your requirements, you can click Manage Policy to go to the Policy Center page to create or modify a backup policy.

    For more information about the parameters in a backup policy, see Manage backup policies.

    Enable Bandwidth Throttling

    To ensure business continuity, you can limit the bandwidth that is used for file backup during peak hours.

    If you enable bandwidth throttling, select the Time Range (Hour) based on your business requirements. Then, configure the Max Bandwidth (MB) parameter for backups within the specified time range, and click Add.

Backup is successful

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

image

Troubleshooting

If the Status of the client or backup job is abnormal, you can resolve the issue based on the following instructions.

  • Client Status: Not Installed

    • If no backup client is installed on an ECS instance, the ECS instance is not backed up. We recommend that you use the ECS file backup feature to back up important data.

    • To back up files from ECS instances, you do not need to manually install a Cloud Backup client. When you create a backup plan for an ECS instance, Cloud Assistant automatically installs a Cloud Backup client on the ECS instance. After the client is installed, the Client Status is Activated and the version number of the client is displayed.

  • Status of the backup job: Failed

    • Modify and confirm the configurations as prompted.

    • View the client logs and locate the error code.

      Note

      The Cloud Backup client is installed in one of the following paths by default. The following paths are for reference only. The actual installation path may be different.

      • On Windows, you can view the logs in the C:\Program Files\Aliyun Hybrid Backup Service Client\logs path.

      • On Linux, you can view the logs in the /opt/alibabacloud/hbrclient/logs path.

  • Status of the backup job: Partially Completed

    Download the list of uncompleted backup files, confirm them one by one, resolve the issue based on the error message, and then run the backup job again.

Browse and download backup files

  • Browse backup files

    You can use the Browse feature to view files that have been backed up. If virus detection has been performed on a backup point, Cloud Backup marks the files that are infected with viruses.

    1. On the Backup Plans tab, find the Cloud Backup client and click the image icon.

    2. In the Backup History section, find the backup point that you want to view, click the backup point, and then click Browse.

    image

  • Download backup files

    You cannot directly download backup files. However, you can restore the backup files to a specified path. For example, if you set Restore Path Type to Specify Path and set Destination Path to /temp/path, the backup files are downloaded to the path after the restore job is completed. You must create the path before you start the restore job. Otherwise, the restore job fails.

Virus detection

To prevent virus-infected files from being restored to the production environment, Cloud Backup provides the Backup Point Virus Detection feature. The feature allows you to select a clean and safe backup point for future data restoration. You can click Virus Detection to check for viruses. For more information, see Backup point virus detection.

Reinstall a Cloud Backup client

Warning

Before you install a Cloud Backup client, check the client installation path first:

  • If a NAS file system is mounted to the installation path, run the umount command to unmount the NAS file system. This prevents the file system from being accidentally deleted.

  • If other important directories and files exist in the installation path, move them to another path. This prevents these directories and files from being accidentally deleted.

To reinstall a Cloud Backup client, perform the following operations: On the ECS Instances tab, click More in the Actions column and click Reinstall Client. After the client is installed, the status of the client changes to Activated. If the client status is abnormal, troubleshoot the issue based on the following topics:

Uninstall a Cloud Backup client

Warning

Before you uninstall a Cloud Backup client, check the client installation path first:

  • If a NAS file system is mounted to the installation path, run the umount command to unmount the NAS file system. This prevents the file system from being accidentally deleted.

  • If other important directories and files exist in the installation path, move them to another path. This prevents these directories and files from being accidentally deleted.

You can uninstall a Cloud Backup client from an ECS instance. After the Cloud Backup client is uninstalled, the status of the client changes to Not Installed.

Delete backup data

You can delete the backup data generated by the Cloud Backup client.

Warning

If you perform this operation, the backup data generated by the Cloud Backup client is deleted and the backup and restore jobs that are being performed by the client fail. Before you delete a Cloud Backup client, make sure that you no longer need the backup data generated by the client and no backup or restore jobs are being performed by the client.

  1. On the Backup Plans tab, find the Cloud Backup client and click the image icon.

  2. In the Backup History section, find the backup point that you want to delete, click the backup point, and then click Delete.

image

Configure an alert rule for a backup job

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.

  • Same as Backup Vault: The Cloud Backup client sends alert notifications by using the same method configured for the backup vault.

  • 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.

Configure parameters for a Cloud Backup client

You can configure parameters for a Cloud Backup client to optimize performance. We recommend that you use the default configurations. You can configure the following parameters:

  • Use HTTPS: specifies whether to use HTTPS to transmit encrypted data that is stored in a backup vault. If you use HTTPS to transmit data, the performance of data transmission is degraded. If you modify the setting of the Use HTTPS switch, the modification takes effect on the next backup or restore job.

  • Data Network: specifies the virtual private cloud (VPC) or public network over which data is transferred. If you have activated the VPC service in the region where the Cloud Backup client resides, we recommend that you select a VPC. This way, you can transmit data in a secure and reliable manner.

  • Maximum number of worker threads: specifies the maximum number of threads that can be run on the Cloud Backup client. A larger number of threads use more resources on the Cloud Backup client and have more negative impacts on the performance of the client. We recommend that you specify a suitable value based on your business scenario.

  • Maximum CPU Cores: specifies the maximum number of CPU cores that can be used on the Cloud Backup client. A larger number of CPU cores use more resources on the Cloud Backup client and have more negative impacts on the performance of the client. We recommend that you specify a suitable value based on your business scenario.

Restore files to an ECS instance

For more information, see Restore files to an ECS instance.

Cross-region backup

To prevent regional disasters from affecting business continuity, Cloud Backup allows you to create a remote mirror vault for a backup vault. Data in the backup vault is automatically replicated to the mirror vault across regions for geo-redundancy. You can create a mirror vault for a general-purpose backup vault that you create by using the following features: ECS file backup, SAP HANA backup, OSS backup, Apsara File Storage NAS backup, on-premises NAS backup, and on-premises file backup. For more information, see Back up data across regions.

In addition, Cloud Backup provides the following enterprise-class features: cross-account backup, automatic archiving, KMS-based encryption, and immutable backup.

References

  • If you need to back up multiple ECS instances at a time for local redundancy or geo-redundancy, or if you need to quickly build and replicate an ECS test environment, we recommend that you use the ECS instance backup feature. For more information, see Overview of the ECS instance backup feature.

  • Cloud Backup provides the disk backup feature. You can create crash-consistent snapshots for all disks, including system disks and data disks. You can use these snapshots to back up or restore an entire disk. For more information, see Back up disks.

  • Back up files from an on-premises server

  • Cloud Backup provides resource plans for various backup scenarios so that you can enjoy higher discounts and minimize your costs. For more information, see Purchase resource plans.

  • For more information about how to back up MySQL, Oracle, and SQL Server databases that are deployed on ECS instances, see Back up a MySQL database, Back up an Oracle database, and Back up an SQL Server database. Before you back up a database, you must register the database in the Cloud Backup console.

  • You can back up files from an on-premises server to the cloud. For more information, see Back up on-premises files.