To improve the efficiency of data backup, the anti-ransomware feature caches data during the backup. By default, data backup caches occupy disk space on your server. If the backup cache files that are stored in a directory on your server occupy a large volume of disk space, you can release the disk space of the directory. To release the disk space, clear the backup cache files in the directory or store the backup cache files in a different directory.
Clear backup caches
To clear backup caches, perform the following steps:
- If the client protection feature is enabled for your server, disable the feature for
your server. If the client protection feature is enabled for your server, Security Center automatically protects the files that are stored in the directory of the Security Center agent. If you want to modify the files in the directory of the Security Center agent and clear cache files, you must disable client protection for the server. For more information about the client protection feature, see Use the client protection feature.
- Log on to the server as the root user.
- Clear the backup cache files that are stored in the directory on your server. The following table lists the directory in which the backup cache files are stored for each version of the anti-ransomware agent.
Client version Operating system of the server Directory in which the backup cache files are stored 1.X.X Windows C:\Program Files (x86)\Alibaba\Aegis\hbr\cache Linux /usr/local/aegis/hbr/cache 2.X.X Windows C:\Program Files (x86)\Alibaba\Aegis\hbrclient\cache Linux /usr/local/aegis/hbrclient/cacheNote After you enable the anti-ransomware feature for your server, the feature backs up the files that are specified in the protection policy. If you delete the cache files, the backup files are not affected.
Modify backup cache configurations
- Log on to the server as the root user.
- Go to the directory in which the anti-ransomware agent is installed. The following table lists the installation directory of each version of the anti-ransomware agent.
Client version Operating system of the server Installation directory of the anti-ransomware agent 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
- Create a file named
- In the
hbr.configfile, configure the parameters that are described in the following table to add data IDs and metadata caches. Then, save the file.
You can configure the parameters in the
hbr.configfile to specify the directory in which the caches are stored and the upper limit of the system memory that the caches can occupy.
Parameter Description disable_blob_cache Specifies whether to cache data entry IDs. Valid values:
- true: does not cache data entry IDs.
- false: caches data entry IDs.
max_blob_cache_weight The maximum percentage of system memory that cached data entry IDs can occupy.
The value must between 0 and 1. The default value is 0.15, which indicates that the cached data entry IDs can occupy up to 15% of system memory.
cache_prefix The path in which the caches are stored.
The path must be an absolute path.
max_retain_count The maximum number of cached data entry IDs that can be retained.
The value must be an integer.
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 that the metadata cache files can occupy. The actual disk space occupied by the files may exceed the specified value.
Default value: 2 GB.Note
- If you set the parameter to 2 GB, you can back up a minimum of 4 TB of metadata.
- The value of the parameter cannot exceed the available disk space.
- If you specify a value that is too small, the backup does not fail but the cache performance is decreased.
The following example shows the configurations of the hbr.config file:
disable_blob_cache = false // Cache data entry IDs. max_blob_cache_weight = 0.15 // Cached data entry IDs can occupy up to 15% of system memory. cache_prefix = D:\CacheFolder // The caches are stored in D:\CacheFolder. max_retain_count = 16 // Up to 16 cached data entry IDs can be retained. disable_file_cache = false // Cache metadata. file_cache_max_size_hint = 2g // Cached metadata can occupy up to 2 GB of disk space.Note After you change the directory in which the cache files are stored, you do not need to restart the anti-ransomware agent. The new configuration automatically takes effect upon the next backup.