To prevent data loss from accidental file deletion or viruses, use Cloud Backup to back up all folders and files on your Elastic Compute Service (ECS) instance. Cloud Backup lets you configure flexible backup policies to back up data to the cloud and restore your data at any time. This topic describes how to use Cloud Backup to back up files from an ECS instance.
Prerequisites
You must activate the Alibaba Cloud Cloud Backup service. Activating Cloud Backup is free of charge. However, when you use the ECS file backup feature of Cloud Backup, you are charged a software usage fee and a storage fee. For more information, see ECS file backup pricing.
Notes
For optimal backup speed, run the Cloud Backup client on a machine that has a 64-bit dual-core CPU or higher and more than 8 GB of available memory.
The amount of data that the system can back up depends on the available memory. With 4 GB of available system memory, you can back up a maximum of 1 million files, totaling 8 TB. If a folder contains tens of millions of files or more, the system requires at least 16 GB of available memory.
When you create a backup plan or attach a backup policy for the first time, Cloud Backup automatically creates the AliyunServiceRoleForHbrEcsBackup service-linked role to obtain permissions to access related resources. A dialog box appears for role authorization. Grant the permissions as prompted.
The ECS backup client must be used with Alibaba Cloud Assistant. For ECS instances purchased before December 1, 2017, you must manually install the Cloud Assistant Agent.
Create a backup plan to periodically back up ECS files
Log on to the Cloud Backup console.
In the navigation pane on the left, choose .
In the top navigation bar, select a region.
On the ECS File Backup page, click the ECS Instances tab. Find the target instance and click Back Up in the Actions column.
In the Create Backup Plan panel, configure the parameters as described in the following table and click OK.
ImportantIf the selected region supports backup policies, you can create a backup plan only by attaching a backup policy. Cloud Backup then periodically backs up ECS files based on that policy.
In the navigation pane on the left of the console, click Policy Center to view the regions that support backup policies. For more information, see Create a backup policy.
Parameter
Description
Backup Folder Rule
Specify the folders to back up. Cloud Backup backs up all files and subdirectories in the specified folders.
Select All Folders or Specified Folders.
If you select All Folders, select whether to enable Exclude System Folders.
If you enable Exclude System Folders, the excluded system directories for Windows and Linux are not included in the backup plan.
Click the
icon to the right of Exclude System Folders to view the details of the excluded system directories.If you do not enable Exclude System Folders, all directories are included in the backup plan.
If you select Specified Folders, you must specify the Source Paths. Click Add Folder to add multiple backup folders.
The source path rules are as follows:
Without a wildcard character (*), you can enter up to eight paths.
With a wildcard character (*), you can enter only one path. Wildcards such as
/*/*are supported.Each line must be an absolute path, such as a path that starts with
/,\\,C:\, orD:\.When you use Volume Shadow Copy Service (VSS), multiple paths, UNC paths, wildcards, and file exclusions are not supported.
When you use UNC, VSS, wildcards, and file exclusions are not supported. If the backup source includes a UNC path, Windows ACLs are not backed up.
Exclude System Folders
Turn on the Exclude System Folders switch to exclude system directories from the backup.
Backup File Type
Select All Types or Specified Type.
If you select All Types, all file types are backed up.
If you select Specified Type, you must specify the file types to back up in the Select File Type box.
Backup Policy
Select a backup policy from the drop-down list.
Cloud Backup automatically backs up the data source according to the backup policy that you select. A backup policy includes settings such as backup vault encryption, backup interval, retention period, geo-redundancy policy, automatic data archiving, and backup point virus scan. This helps you flexibly manage your data source assets.
If the default backup policy does not meet your backup requirements, click Create Backup Policy or Edit Policy to manage backup policies. For more information about backup policy parameters, see Policy center.
Enable Bandwidth Throttling
Bandwidth throttling helps you control backup traffic during peak business hours to avoid affecting your services.
To use bandwidth throttlingg, turn on the Enable Bandwidth Throttling switch, select a Time Range, enter the Max Bandwidth (MByte/s) that can be used for backups within the time window, and then click Add.
Successful backup
When the scheduled backup time arrives, Cloud Backup starts and runs the backup job.
NoteThe backup progress percentage is a dynamic estimate that the system generates based on the current data volume and is for reference only. It may not reflect the exact completion percentage. During the backup process, the displayed total scanned size may be smaller than the actual total data size because the data scan is not yet complete. The completion of the backup job is determined by its final status.
On the Backup Jobs tab, if the Status of a backup job is Completed, the backup is successful.
View details about the backup job, such as Total Scan, Completed Backups, Written to Vault, and Backup Speed. For more information about these metrics, see the tooltips in the Cloud Backup console.
NoteFor backup jobs completed on or after June 1, 2025, statistics for both data volume and file count are displayed for Total Scanned at Source, Backup Completed, and Data Written to Vault. For backup jobs completed before this date, only data volume statistics are shown for these metrics.

On the Backup Plans tab, click the
icon next to the target ECS instance to view the backup records and the generated backup points in the Backup History. You can use these historical backup points to restore ECS files.
Troubleshooting
If the client or backup job Status is abnormal, refer to the following information.
Client Status: Not Installed
The backup client is not installed on the ECS instance. This means the ECS instance is not protected by a backup. We strongly recommend that you use this feature to back up important data.
You do not need to manually install the backup client to back up files on an ECS instance. When you create a backup plan for an ECS instance, Cloud Assistant automatically installs the client. After the installation is complete, the Client Status changes to Activated and the client version number is displayed.
Backup status is Failed
Follow the prompts on the interface to modify the configuration and confirm that it is correct.
Check the logs to locate the specific error code.
NoteThe default installation paths for the backup client are for reference only. Use the actual installation path when you perform operations.
Windows log path: Local Disk (C) > Program Files > Aliyun Hybrid Backup Service Client > logs
Linux log path: /opt/alibabacloud/hbrclient/logs
Backup status is Partially Completed
Download the list of files that failed to be backed up, check each file, and resolve the errors based on the error messages. Then, run the backup job again.
NoteIf you use the VSS feature when backing up files on a Windows ECS instance, the file path in the error message contains `shadow_ali_ids`, which is the path where VSS snapshot data is stored. You can ignore this information. For example, if the error message shows the path
E:\shadow_ali_ids\test, the actual file path isE:\test.
Browse and download backup files
Browse backup files
The Browse feature lets you browse backed-up files. If a virus scan was performed on the backup point that you are browsing, Cloud Backup marks any files that are infected with a virus.
On the Backup Plans tab, find the target client and click
.In the Backup History, find the backup point for the desired time, click the backup point, and select Browse.

Download backup files
You cannot directly download backed-up files. You can indirectly download them by restoring them to a specified path. For example, during restoration, set Restore Path Type to Specify Path and set Destination Path to
/temp/path. Create this path before you start the restore job. Otherwise, the job fails. After the restore job is complete, the files from the backup point are downloaded to this path.
Extend the retention period of a backup point
To keep historical data from an ECS file backup for an extended period, extend the retention period of the backup point.
The retention period of a backup point can only be extended. It cannot be shortened.
You cannot extend the retention period for backup points that are set to be retained permanently.
On the Backup Plans tab, click the
icon next to the target ECS instance.In the Backup History, click the historical backup point whose retention period you want to extend. Set a specific time or select Never Expire.

Click Save.
After the setting is complete, view the new expiration time in the Expires At field.

Virus scan
To prevent files that contain viruses from being restored to your production environment, the Cloud Backup service provides the Backup Point Virus Detection feature. This feature helps you select a clean and safe backup point for future data restoration. Click Virus Detection to check files for viruses. For more information, see Backup point virus scan.
Reinstall the backup client
Before you install the client, check the client installation path:
If a NAS folder is mounted to the installation path, you must use the
umountcommand to unmount the NAS folder to prevent accidental deletion of NAS files.If the installation path contains other important folders and files, move them to another folder to prevent accidental deletion of important files.
On the ECS Instances tab, find the target instance. In the Actions column, choose to install the client. After the installation is complete, the client status updates to Activated.

If the client status is abnormal, refer to the following documents for troubleshooting.
Uninstall the client
Before you uninstall the client, check the client installation path:
If a NAS folder is mounted to the installation path, you must use the
umountcommand to unmount the NAS folder to prevent accidental deletion of NAS files.If the installation path contains other important folders and files, move them to another folder to prevent accidental deletion of important files.
On the ECS Instances tab, find the target instance. In the Actions column, choose to uninstall the backup client. After the uninstallation is complete, the client status updates to Not Installed.

Delete a backup
Delete the backup data that is generated by a backup client.
Deleting a backup deletes the backup data generated by the backup client and causes any running backup or restore jobs to fail. Before you delete a backup, make sure that you no longer need the backup data and that no backup or restore jobs are running.
On the Backup Plans tab, click the
icon next to the target ECS instance.In the Backup History, find the backup point you want to delete, click the backup point, select Delete, and confirm the deletion.

Set alerts for backup jobs
If the backup client or a backup or restore job has an abnormal status, configure alert notifications to be promptly notified of exceptions. On the ECS Instances tab, find the target instance. In the Actions column, choose .

Alert notification method | Description |
Disabled | No alert notifications are sent for this client. |
Same as Backup Vault | This client uses the same alert method as the backup vault. |
Notify Alibaba Cloud Account | Backup alert notifications for this client are sent to the Alibaba Cloud account by email. |
Custom | Select one or more contacts or contact groups. After the configuration is complete, backup alerts for this client are sent to the selected contacts or contact groups. For more information, see Manage alert contacts. |
Configure backup client parameters
To optimize client performance, find the target instance on the ECS Instances tab. In the Actions column, choose . We recommend that you use the default configurations.

Client Setting | Description |
Use HTTPS | Select whether to use the HTTPS protocol for data transmission. Because HTTPS transmission involves encryption and decryption, it may affect transmission performance. If you modify this configuration, the change takes effect the next time a backup or restore job starts. Note This setting only affects data security during network transmission. Regardless of whether HTTPS is enabled, backup data is encrypted when stored in the backup vault. |
Data Network | Select whether to transmit data over a VPC or the Internet. If your client is deployed in an Alibaba Cloud VPC or is connected to an Alibaba Cloud VPC through a leased line, select VPC as the transmission network. |
Maximum number of worker threads | Set the maximum number of worker threads for the backup client. A larger number of threads consumes more host resources and has a greater impact on host performance. Set this parameter after evaluation. |
Maximum CPU Cores | Set the maximum number of CPU cores that the backup client can use. A larger number of CPU cores consumes more host resources and has a greater impact on host performance. Set this parameter after evaluation. |
Restore ECS files
For more information, see Restore ECS files.
Cross-region backup support
To prevent regional disasters from affecting business continuity, Cloud Backup supports creating cross-region mirror vaults for backup vaults with a Storage Vault Type of General Backup or Tablestore Backup. For general backup vaults that store ECS files, you can create a cross-region mirror vault for cross-region disaster recovery. After the mirror vault is created, data in the source backup vault is automatically replicated to the cross-region mirror vault to ensure data consistency between the two regions. You can also perform cross-region data restoration from the mirror vault when needed. For more information, see Cross-region backup. In addition, ECS file backup also supports enterprise-level features such as Cross-account backup, Automatic archiving, KMS encryption, Backup lock, Backup point virus scan, and Tag-based automatic resource association for backup.
Configure retry parameters for failed ECS file backups
If a file backup job fails due to factors such as an unstable network, configure retry parameters.
Log on to the server whose files you want to back up.
Switch to the default installation directory of the Cloud Backup client.
In the
clientfolder, create a file namedhbr.config.NoteThe
hbr.configfile is in the same directory as thehbrclientandidsexecutable programs.Add the following parameters to the
hbr.configfile.Parameter
Description
retry_times
For clients of version 2.16.0 and later, this is the number of data backup retries. The default value is 30.
retry_interval
For clients of version 2.16.0 and later, this is the data backup retry interval. The default value is 1000 milliseconds.
skip_error_files
Specifies whether to skip files that fail to be backed up.
false (default): Does not skip files that fail to be backed up.
true: Skips files that fail to be backed up.
The following is a sample configuration of the hbr.config file:
retry_times=30 retry_interval=1000 skip_error_files=false
References
To back up ECS instances in batches, either locally or to a different region, or to quickly set up and replicate an ECS development and testing environment, use ECS instance backup.
Disk backup creates crash-consistent backups for all types of disks of an ECS instance, including system disks and data disks. This feature lets you back up or restore an entire disk. For more information, see Create a disk backup.
Cloud Backup provides resource plans for various backup scenarios. These plans offer significant discounts to help you save on costs. For more information, see Resource plan purchase guide.
To back up MySQL, Oracle, or SQL Server databases in an ECS instance, see Back up MySQL, Back up Oracle, and Back up SQL Server. Before you back up a database, you must register the database in the Cloud Backup console.
To back up files from a local server to the cloud, see Back up on-premises files.