Back up ECS files
To prevent data loss caused by accidental file deletion or cloud server virus infections, we recommend that you use Cloud Backup to back up all directories and files on an ECS instance. Cloud Backup supports flexible backup policies and backs up data to the cloud, so that you can view and restore data at any time. This topic describes how to use Cloud Backup to back up files on an ECS instance.
Prerequisites
You have activated the Alibaba Cloud Cloud Backup service. Activating Cloud Backup is free of charge. Using Cloud Backup ECS File Backup Standard Edition incurs a software usage fee (file backup software usage fee) and a storage capacity fee. For more information, see ECS file backup fees.
Usage notes
-
For optimal backup speed, run the Cloud Backup client on a machine with a 64-bit dual-core CPU or higher and more than 8 GB of available memory.
-
The amount of data that can be backed up depends on available memory. A system with 4 GB of available memory can back up a maximum of 1 million files, with a total data size of up to 8 TB. If you need to back up directories that contain tens of millions of files or more, we recommend using a system with at least 16 GB of available memory.
-
When you create a backup plan or bind 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 requires Cloud Assistant. For ECS instances purchased before December 1, 2017, you must manually install the Cloud Assistant Agent.
-
Starting from client version 2.31.0, the system automatically excludes specific directories when you back up ECS files. The default exclusion rules are as follows:
NoteYou can view the directories that are excluded by default in the console by clicking the information icon next to Exclude System Folders
The default excluded directories vary between the basic and standard editions:
-
ECS File Backup Standard Edition
-
Linux file system: The following directories are excluded by default:
/dev/,/proc/,/sys/,/boot/,/run/,/var/run/,/lost+found/, and the client installation directory. -
Windows file system: The following files and directories are excluded by default:
Users\Administrator\AppData\Local\Microsoft\Windows\UsrClass.dat,Users\Administrator\UsrClass.dat,Users\Administrator\NTUSER.DAT,Users\Administrator\ntuser.dat.LOG*,%SYSTEMDRIVE%\Boot,%SYSTEMDRIVE%\Windows,%VOLUME%\System Volume Information\,%VOLUME%\$Recycle.Bin,%VOLUME%\pagefile.sys,%VOLUME%\hiberfil.sys, and the client installation directory.
-
-
ECS File Backup Essential Edition
-
Linux file system: The following directories are excluded by default:
/bin/,/usr/bin/,/sbin/,/usr/sbin/,/srv/,/selinux/,/lib/,/lib32/,/lib64/,/boot/,/run/,/dev/,/proc/,/sys/,/lost+found/, and the client installation directory. -
Windows file system: The following files and directories are excluded by default:
Windows\,python27\,Program Files (x86)\,Program Files\,ProgramData\,Boot\,$RECYCLE.BIN\,System Volume Information\,Users\Administrator\NTUSER.DAT,Users\Administrator\ntuser.dat.LOG1,pagefile.sys, and the client installation directory. Notice: All subdirectories with the same name are excluded as system directories.
-
-
Video tutorial
Back up ECS files
Create a backup plan
-
On the ECS File Backup Standard Edition page, select the region of the target ECS instance, and then click Add ECS File Backup Standard Edition.
NoteIf you are using the old console (which displays Try New Version in the upper-right corner), go to the ECS Instances tab and click Actions in the Back Up column of the target instance.
-
In the Create Backup Plan panel, configure the parameters as described in the following table.
Parameter
Description
Account
Specify the account to which the backup resources belong. By default, the current account is selected. You can also select an added account whose resources you want to back up. Only one account can be selected.
To manage cross-account backups, click Manage cross-account backups.
NoteIf you are using the old console, select the account on the ECS instance list tab.
ECS to Back Up
Select the ECS instances that you want to back up. You can select multiple instances to create backup plans in bulk.
NoteIf you are using the old console, this parameter is automatically configured based on the selected ECS instance.
Backup Folder Rule
Specify the directories to back up. Cloud Backup backs up all files and subdirectories in the specified directories.
Select All Folders or Specified Folders.
-
If you select All Folders, select whether to enable Exclude System Folders.
-
If Exclude System Folders is enabled, the system directories excluded on Windows and Linux are not included in the backup plan.
To view details about the excluded system directories, click Exclude System Folders and then click the
icon to the right. -
If Exclude System Folders is not enabled, all directories are included in the backup plan.
-
-
If you select Specified Folders, specify the Source Paths. Click Add Folder to add multiple backup directories.
The backup path rules are as follows:
-
You can enter up to eight paths if you do not use a wildcard character (*).
-
You can enter only one path if you use a wildcard character (*). Wildcards such as
/*/*are supported. -
Each line must specify an absolute path that starts with
/,\\,C:\, orD:\. -
When VSS is enabled, multiple paths, UNC paths, wildcards, and file exclusions are not supported.
-
When UNC paths are used, VSS, wildcards, and file exclusions are not supported. If the backup source includes a UNC path, Windows ACLs are not backed up.
-
Backup File Type
Select All Types or Specified Type.
-
If you select All Types, all file types are backed up, and file name extensions are ignored.
-
If you select Specified Type, specify the file types to back up in the Select File Type box.
Backup Policy
Select an appropriate backup policy from the drop-down list.
Cloud Backup automatically backs up data sources based on the backup policy that you configure. A backup policy mainly covers the backup vault encryption method, backup interval, backup retention period, geo-redundancy replication policy, automatic backup archiving, and backup point virus detection, helping you flexibly manage the assets of each data source.
If the default backup policies cannot meet your backup plan, click Create Backup Policy or Edit Policy to manage backup policies. For more information about the parameters in a backup policy, see Policy Center.
Use VSS
Specifies whether to use the Windows Volume Shadow Copy Service (VSS) feature to accelerate backups. This feature is available only for Windows.
NoteWhen you use VSS, you cannot back up multiple paths or UNC paths, use wildcards, or exclude files.
To use VSS, turn on the Use VSS switch.
Enable Bandwidth Throttling
Bandwidth throttling helps you control backup traffic during peak business hours to avoid affecting your services.
To use bandwidth throttling, turn on the Enable Bandwidth Throttling switch, select a Time Range (Hour) based on your business requirements, enter the maximum Max Bandwidth (MByte/s) that backups can use within the throttling period, and then click Add.
-
-
Click OK to complete the configuration.
Backup run status
|
Backup run status |
Description |
|
Preparing |
The system is preparing the resource for backup, which may include installing the backup client. After preparation is complete, the first backup runs automatically based on the policy. |
|
Preparation Failed |
The backup client installation failed. View the error details in the console. |
|
Ready |
The backup client is installed and waiting for the first backup to start. |
|
Backing Up |
The backup plan is active and waiting for the next scheduled backup job to run. |
|
Backing Up (In Progress) |
A backup job is in progress. |
|
Paused |
All backup plans for this resource are paused. To resume backups, enable a backup plan on the backup details page. |
|
Stopped |
The source resource cannot be found, likely because it was deleted. The backup data is automatically deleted after it expires. You can view the backup expiration time or restore data from the backup history list on the backup details page. |
View backup jobs
At the scheduled backup time, Cloud Backup starts the backup job.
The backup progress percentage is a dynamic estimate and is for reference only. The displayed amount of scanned data may be lower than the actual total while the scan is in progress. Only the final status of the backup job confirms its completion.
On the Backup Jobs tab, a Status of Completed indicates that the backup was successful. You can view details for the backup job, such as Total Scanned Data Amount at Source, Completed Backup Data Amount, Data Amount Written to Backup Vault, and Backup Speed. See the tooltips in the Cloud Backup console for descriptions of these metrics.
-
For backup jobs completed on or after June 1, 2025, the Total Scanned Data Amount at Source, Completed Backup Data Amount, and Data Amount Written to Backup Vault display both data volume and file count. For backup jobs completed before this date, only the data volume is displayed.
-
The job list displays only backup job records from the last six months. To access older records, export them using Backup audit reports.
To cancel a single running backup job, click Cancel in the Actions column of the backup job and confirm the cancellation.
Manage backups
On the ECS File Backup Standard Edition page, select the region of the target ECS instance, click View Details to the right of the target ECS instance, and then manage the backup content as required in Backup History.
If you are using the old console (which displays Try New Version in the upper-right corner), perform the operations on the Backup Plans tab by clicking the
icon in front of the target instance. Operations in the old console are the same as those performed after you click the
icon to switch the display mode.
Browse backup files
The Browse feature allows you to browse backed-up files. If virus detection has been performed on the backup point that you want to browse, files infected with viruses are marked.
-
In Backup History, click Browse in the Actions column of the target backup point.
Alternatively, click the
icon on the right side of the backup history list to switch the display mode, click the target backup point, and then select Browse. -
In the Browse panel, view the backed-up ECS files.
Backed-up files cannot be downloaded directly. You can download them indirectly by restoring them to a specified path. For example, when you restore files, select Specify Path for Restore Path Type and set Destination Path to /temp/path. You must create this path before the restore job starts. Otherwise, the restore fails. After the restore job is complete, the files in the backup point are downloaded to this path.
Extend backup point retention
To retain a backup for a longer period, extend its backup point retention period.
-
The retention period of a backup point can only be extended. It cannot be shortened.
-
The retention period cannot be extended for backup points that are set to be retained permanently.
-
In Backup History, in the Expires At column of the target backup point, click the
icon.Alternatively, click the
icon on the right side of the backup history list to switch the display mode, click the target backup point, and then click the
icon to the right of Expires At. -
Configure Schedule Time or select Never Expire, and then click Save.
After the setting is complete, you can view the new expiration time in Expires At.
Delete backups
Delete the backup point data that is generated by the backup client.
-
Deleted backup points cannot be restored. Proceed with caution.
-
If the backup plan has the "Keep at least one backup version" setting enabled, you cannot delete the latest backup. To delete this backup, you must first disable the "Keep at least one backup version" setting in the backup plan.
In list mode in Backup History, delete backup points by using either of the following methods.
-
Delete a single backup point: Click Actions in the Delete column of the target backup point and confirm the deletion.
-
Delete backup points in batches: Select the target backup points, click Delete Backup Point below the list, and confirm the deletion.
Alternatively, click the
icon on the right side of the backup history list to switch the display mode, click the target backup point, and then select Delete.
Manage backup plans
On the ECS File Backup Standard Edition page, select the region of the target ECS instance, click View Details to the right of the target ECS instance, switch to the Backup Plans tab, and then manage backup plans as required.
If you are using the old console (which displays Try New Version in the upper-right corner), perform the operations on the Backup Plans tab by choosing the required function from the Actions column of the target instance.
Run a backup immediately
In the Actions column of the backup plan, select to immediately run a backup.
Modify a backup plan
-
In the Actions column of the backup plan, click Modify.
-
In the Configure Plan panel, modify basic settings, backup policies, and other configurations as required.
-
Click OK.
Pause or resume a backup plan
Backup plans are enabled by default. If you need to stop data backups for a specific period, you can pause the backup plan. You can resume it later.
-
Pause a backup plan: Turn off the switch in the Plan Status column, or select in the Actions column, and confirm the pause.
After a plan is paused, subsequent backup jobs will not run. Existing backup points are not affected and expire based on their retention period. If the "keep at least one backup version" setting is enabled, the last backup version is not subject to the retention period. If backup points still exist for the ECS instance after the plan is paused, billing for the ECS instance continues.
-
Resume a backup plan: After pausing a backup plan, turn on the switch in the Plan Status column, or select in the Operation column.
Delete a backup plan
-
You cannot delete a backup plan if the instance has valid backups. You must first delete the backups. If you want to stop the backup plan from running without deleting it, you can pause the plan.
-
Deleted backup plans cannot be restored. After all backup plans and backup points for an ECS instance are deleted, the instance is removed from the list of backed-up ECS instances.
In the Actions column of the backup plan, select , and confirm the deletion.
Manage backup client
On the ECS File Backup Standard Edition page, select the region of the target ECS instance, click View Details to the right of the target ECS instance, and then manage the backup client as required in the Client Information area.
If you are using the old console (which displays Try New Version in the upper-right corner), perform the operations on the ECS Instances tab by choosing the required function from the Actions column of the target instance.
Reinstall the backup client
Before you install the client, check the installation path:
-
If a NAS directory is mounted to the installation path, you must run the
umountcommand to unmount the NAS directory to prevent accidental deletion of NAS files. -
If the installation path contains other important directories or files, move them to another location to prevent accidental deletion.
To reinstall the client, select under Client Operation. After the installation is complete, the client status changes to Activated.
If the client status is abnormal, see Troubleshoot abnormal file backup client status, How to check the running status of a Cloud Backup client, and How to view the default installation path and logs of a Cloud Backup client for troubleshooting.
Configure client parameters
Click Client Operation to the right of Client Settings, configure the client parameters, and save the settings. We recommend that you use the default settings.
|
Setting |
Description |
|
Use HTTPS to Transfer Data |
Specifies whether to use the HTTPS protocol for data transmission. The encryption and decryption process of HTTPS may affect transmission performance. If you modify this setting, the change takes effect the next time a backup or restore job starts. Note
This setting affects data security only during network transmission. Backup data is always encrypted when stored in the backup vault, regardless of whether HTTPS is enabled. |
|
Data Network |
Select VPC or public network for data transmission. If your client is deployed in an Alibaba Cloud VPC, or already connected to an Alibaba Cloud VPC through a leased line, select VPC as the transmission network. |
|
Maximum number of worker threads |
The maximum number of worker threads for the backup client. A higher number of threads consumes more host resources and has a greater impact on host performance. We recommend that you evaluate your resource usage before changing this setting. |
|
Maximum CPU Cores |
The maximum number of CPU cores that the backup client can use. A higher number of CPU cores consumes more host resources and has a greater impact on host performance. We recommend that you evaluate your resource usage before changing this setting. |
|
Alarm When Job Partial Completed |
Some system files or files exclusively locked by other programs may be skipped during a backup, resulting in a partially completed job. If client alerts are enabled, you can specify whether to receive alerts for partially completed backup jobs. To receive alerts for partially completed backup jobs, turn on the Alarm When Job Partial Completed switch. |
Configure retry parameters
If a file backup fails, for example, due to an unstable network, you can configure the following parameters to enable automatic retries.
-
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 must be in the same directory as thehbrclientandidsexecutable programs. -
In the
hbr.configfile, add the following parameters.Parameter
Description
retry_times
For clients of version 2.16.0 and later, this parameter specifies the number of data backup retries. The default value is 30.
retry_interval
For clients of version 2.16.0 and later, this parameter specifies the data backup retry interval. The default value is 1,000 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 code provides a sample configuration of the hbr.config file:
retry_times=30 retry_interval=1000 skip_error_files=false -
Uninstall the client
Before you uninstall the client, check the installation path:
-
If a NAS directory is mounted to the installation path, you must run the
umountcommand to unmount the NAS directory to prevent accidental deletion of NAS files. -
If the installation path contains other important directories or files, move them to another location to prevent accidental deletion.
To uninstall the client, select under Client Operation. After the client is uninstalled, the client status changes to Unmounted.
Cancel ECS instance backups
-
When you cancel backups for an ECS instance, Cloud Backup deletes the backup data of the instance. This causes running backup and restore jobs to fail, stops billing for the backup service, and removes the instance from the backup list.
-
Before you cancel backups, make sure that you no longer need the backup data of the ECS instance and that no backup or restore jobs are in progress.
On the ECS File Backup Standard Edition page, select the region of the target ECS instance, click View Details in the Actions column of the target ECS instance, and on the Backup Details tab, click Stop Backup to the right of Backup Running Status and confirm the cancellation.
If you are using the old console (which displays Try New Version in the upper-right corner), select in the Actions column of the target ECS instance on the ECS Instances tab, and confirm.
Enterprise features
Virus detection
To prevent infected files from being restored to your production environment, Cloud Backup provides the Backup point virus detection feature. This helps you select an uninfected backup point for future restores. On the Backup Details tab, in the Backup History section, find the backup point you want to scan, click ┇ in the Actions column, and then select .
Backup vault replication
To prevent regional disasters or account management risks from affecting business continuity, Cloud Backup supports configuring Cross-region backup or Cross-account backup vault replication for backup vaults where the Storage Vault Type is General Backup. Once configured, data from the source backup vault is automatically synchronized to the destination backup vault, ensuring data consistency between the two locations. You can also perform cross-region data recovery from the destination backup vault as needed.
For general-purpose backup vaults that store ECS files, backup vault replication provides an effective solution for cross-region or cross-account disaster recovery.
In addition, the standard edition of ECS file backup supports other enterprise-grade features, such as cross-account backup, automatic archiving, KMS-based encryption, immutable backup, and tag-based automatic resource association and backup.
Troubleshooting
When the Status of the client or a backup job is abnormal, you can troubleshoot the issue based on the following suggestions.
-
Client Status: Not Installed
-
The backup client is not installed on the ECS instance, which indicates that the instance is not protected by backups. We strongly recommend that you back up important data by using this feature.
-
With ECS File Backup Standard Edition, you do not need to manually install the backup client. When you create a backup plan for an ECS instance, Cloud Assistant automatically installs the client. After installation, Client Status is Activated and the client version is displayed.
-
-
Backup status is Failed
-
Follow the prompts on the UI to check and correct the configuration.
-
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 in your 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 were not backed up, check each one, resolve the issues based on the error messages, and then run the backup job again.
NoteIf you use the VSS feature when backing up files on a Windows ECS instance, the file paths in the error messages may include shadow_ali_ids (the path where the VSS snapshot data is stored). You can ignore this part of the path. For example, the error message path
E:\shadow_ali_ids\testcorresponds to the actual file pathE:\test. -
If you need more help, see Online Technical Support.
Related documents
-
If you need to back up ECS instances in batches, either locally or to a different region, or quickly set up and replicate an ECS development and testing environment, we recommend using ECS instance backup.
-
Cloud Backup provides resource plans for various backup scenarios, which offer greater price discounts and help you save costs to a larger extent. For more information, see Purchase resource plans.
-
To back up MySQL, Oracle, or SQL Server databases in an ECS instance, see Back up a MySQL database, Back up an Oracle database, and Back up an SQL Server database. Before backing up a database, you must first register it in the Cloud Backup console.
-
To back up files from an on-premises server to the cloud, see Back up on-premises files.