The anti-ransomware service caches data to improve backup efficiency. By default, this process uses your server's memory and disk space. If the cache files consume too much disk space, backup jobs may fail. This topic describes how to resolve this issue by modifying the backup cache configuration.
Problem description
Anti-ransomware backup jobs consume excessive disk space on the server.
Cause
Anti-ransomware backups temporarily use disk space. The cached data is deleted from the server after the backup is uploaded to the cloud. The cache can consume excessive disk space if you have many large backup files, or if a program does not run correctly.
Modify the backup cache configuration
Follow these steps to modify the cache location, status, and maximum memory usage.
The anti-ransomware feature and Cloud Backup share a client. Changes to the client configuration affect both services. Before you modify the configuration, assess the impact on Cloud Backup.
If client self-protection is enabled for the server, disable it first.
Log on to the Security Center console. In the upper-left corner of the console, select the region where your assets reside: Chinese MainlandChina or Outside Chinese Mainland.
In the navigation pane on the left, choose .
On the Host Asset page, find the target server and click View in the Actions column.
In the Defense Status section, turn off the Client Self-protection switch.

Log on to the server with an administrator account.
Navigate to the installation path of the anti-ransomware client.
The following table lists the default installation directory for different versions of the anti-ransomware client.
Client version
Server operating system
Installation directory of the anti-ransomware client
1.X.X
Windows
C:\Program Files (x86)\Alibaba\Aegis\hbr\client
Linux
/usr/local/aegis/hbr/client
2.X.X
Windows
C:\Program Files (x86)\Alibaba\Aegis\hbrclient\client
Linux
/usr/local/aegis/hbrclient/client
In the installation directory of the anti-ransomware client, which is
../clientby default, create anhbr.configfile.In the
hbr.configfile, add the following parameters to configure the data ID and metadata cache, and then save the file.ImportantThe parameter settings take effect immediately after you save the hbr.config file. You do not need to restart the server or VM.
The parameter settings are applied only to subsequent backup jobs. You cannot accelerate the existing backup jobs by caching data entry IDs and metadata.
You can configure parameters in the
hbr.configfile to set the cache location, the maximum system memory usage for the cache, and other cache-related settings.The following example shows the configuration of the hbr.config file:
disable_blob_cache = false max_blob_cache_weight = 0.15 cache_prefix = D:\CacheFolder max_retain_count = 16 disable_file_cache = false file_cache_max_size_hint = 32GB file_cache_disk_free_space_hint = 1GB file_cache_max_retain_count = 2Parameter
Description
disable_blob_cache
Specifies whether to enable data ID caching. Caching data IDs and metadata from the backup source reduces network requests and accelerates backups. Valid values:
true: Data ID caching is disabled.
false: Data ID caching is enabled.
max_blob_cache_weight
The maximum system memory that can be used by the cache for data entry IDs. Default value: 0.15. The value indicates 15% of the total system memory. The value must be between 0 and 1.
cache_prefix
The path in which the cached data entry IDs are stored. The value must be an absolute path.
max_retain_count
The maximum number of cached data entry IDs.
disable_file_cache
Specifies whether to cache metadata. Valid values:
true: does not cache metadata.
false: caches metadata.
file_cache_max_size_hint
The maximum disk space occupied by a file cache. Default value: 32 GB. If the disk space occupied by a file cache exceeds this value, the file backup fails and the system prompts that the file cache space is insufficient. In this case, set the file_cache_max_size_hint parameter to a larger value. For example, the backup cache of 10 million files occupies about 1.5 GB of disk space each time. The specific disk space occupied is related to the number of source files, the total data volume, and the full path length. A new cache space is generated during the backup. The formula to calculate the space to be reserved for the disk is: 1.5 GB × (file_cache_max_retain_count + 1) + file_cache_disk_free_space_hint.
NoteThis parameter takes effect only for anti-ransomware client V2.13.1 and later.
file_cache_disk_free_space_hint
The available space of the disk where a file cache is located. Default value: 1 GB. If the available disk space is less than this value, the file backup fails and the system prompts that the file cache space is insufficient. In this case, adjust the cache space as required.
NoteThis parameter takes effect only for anti-ransomware client V2.13.1 and later.
file_cache_max_retain_count
The number of file caches reserved for each backup path. Default value: 2. For example, if the value is set to 2, the caches of the last two backups are retained locally. If the latest backup is deleted, the second last backup can still be found.
NoteThis parameter takes effect only for anti-ransomware client V2.13.1 and later.
You can view the version of the anti-ransomware client on the page.
