69964: Acronis Cyber Infrastructure: How to set up custom log rotation

use Google Translate

    Last update: 26-11-2022

    Introduction

    Sometimes it is required to change default log rotation or retention period for Acronis Cyber Infrastructure components due to various reasons.

    Solution

    Should you have any questions or experience any difficulties in following the below steps, contact Acronis support for assistance.

    ABGW log rotation settings

    1. Default log rotation for ABGW logs is to keep 50 files 200MB each, current setting can be double-checked in the /etc/vstorage/abgw.config file on any node included into Backup Gateway:

    # grep ^log /etc/vstorage/abgw.config
    log.file = /var/log/abgw/abgw.log.zst
    log.rotate = 50x200M

    2. Before making any changes into configuration files make a backup copy of file:

    # cp /etc/vstorage/abgw.config /etc/vstorage/abgw.config.original

    3. Edit the configuration file specifying required number of x200M log files for log.rotate parameter , e.g.:

    # sed -i "s/^log.rotate = .*$/log.rotate = 10x200M/" /etc/vstorage/abgw.config
    # grep ^log.rotate /etc/vstorage/abgw.config
    log.rotate = 10x200M

    Note: it is not recommended to set up log rotation lower than 5x200M.

    4. Restart vstorage-abgw service:

    systemctl restart vstorage-abgw

    After that the new log rotation value will be applied and older ABGW log files will be automatically deleted.

    Prometheus retention policy

    Default retention for Prometheus metrics is 7 days. In order to configure custom retention parameters in ACI cluster follow the documentation: Administrator Guide - Configuring retention policy for Prometheus metrics.

    Tags: