All Products
Search
Document Center

Cloud Backup:Back up files from an ECS instance

Last Updated:Mar 05, 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. You are charged for using the ECS file backup feature of Cloud Backup. For more information, see Get started with ECS file backup.

  • Cloud Assistant Agent is installed on the ECS instance. Cloud Assistant Agent is automatically installed on ECS instances. For more information, see Before you begin.

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 File Backup page, click New Version.

  5. On the ECS Instances tab, find the ECS instance and click Back Up in the Actions column.

  6. 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, and automatic archiving of backups.

    If the default backup policy does not meet your requirements, you can click Create Policy or Edit Policy 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 the backup job. If the Status of the backup job is Successful, the backup job is completed on the current day. You can view the backup points in the backup history.

image.png

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.

Related operations

After you install a Cloud Backup client, go to the ECS Instances tab. Find the Cloud Backup client, click More in the Actions column, and then select the operation that you want to perform. The following table describes the operations.

Operation

Description

Reinstall Client

Installs a Cloud Backup client on an ECS instance. After the Cloud Backup client is installed, the status of the client changes to Activated .

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.

Uninstall Client

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

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.

Delete Backup

Deletes all backup data generated by the Cloud Backup client.

Warning

If you delete a backup point, all backup data generated by the Cloud Backup client is deleted and all 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.

Alert Settings

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

Client Settings

Configures the Cloud Backup client. The following list describes the 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.

What to do next

Restore files to an ECS instance

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 Create disk backups.

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