To accelerate 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 caches in C:\Program Files (x86)\Alibaba\Aegis\hbr\cache on a Windows server or /usr/local/aegis/hbr/cache on a Linux server occupy a large volume of disk space, you can release the disk space. To release the disk space, clear the backup caches or change the directory in which the backup caches are stored.

Background information

In most cases, backup files are temporarily stored on a disk of your server and backup caches are generated. After the backup files are uploaded to the cloud, the backup caches are automatically deleted from the disk. If a large number of backup files exist, the size of a backup file is large, or a program does not run as expected, the backup caches may occupy a large volume of disk space. We recommend that you clear backup caches on a regular basis to improve server performance.

Clear backup caches

To clear backup caches, perform the following steps:

  1. Disable client protection for your server.
    Note
    • If client protection is disabled for your server, skip this step.
    • If client protection is enabled for your server, Security Center automatically protects the files 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.
    1. Log on to the Security Center console.
    2. In the left-side navigation pane, click Settings.
    3. On the General tab of the Settings page, find the Client Protection section and click Manage.
    4. In the Client Protection dialog box, select the servers for which you want to disable client protection and move them from the Protected section to the Unprotected section. Disable client protection
    5. Click Determine.
  2. Log on to the required server as the root user.
  3. Clear the cache files in C:\Program Files (x86)\Alibaba\Aegis\hbr\cache on a Windows server or /usr/local/aegis/hbr/cache on a Linux server.
    Note 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

To accelerate data backup, the backup caches are automatically stored in C:\Program Files (x86)\Alibaba\Aegis\hbr\cache on a Windows server or /usr/local/aegis/hbr/cache on a Linux server. To change the directory in which backup caches are stored, perform the following steps:

  1. Log on to the required server as the root user.
  2. Find and go to the path in which the anti-ransomware client is installed.
    In most cases, the path is C:\Program Files (x86)\Alibaba\Aegis\hbr\client on a Windows server and /usr/local/aegis/hbrclient/client/ on a Linux server.
  3. Create a file named hbr.config in the client folder.
  4. In the hbr.config file, 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.config file 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.
    • If you set the parameter to a small value, the backup does not fail but the cache performance is degraded.
    • The value of the parameter cannot exceed the available disk space.

    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 client. The new configuration automatically takes effect upon the next backup.