Help Center/ MapReduce Service/ User Guide/ MRS Cluster O&M/ Viewing Logs of an MRS Cluster/ Configuring the Number of Local Backups of MRS Cluster Audit Logs
Updated on 2025-08-11 GMT+08:00

Configuring the Number of Local Backups of MRS Cluster Audit Logs

Audit logs of cluster components are classified by name and stored in the /var/log/Bigdata/audit directory on each cluster node. The OMS automatically backs up the audit log directories at 03:00 every day.

The audit log directory on each node is compressed and named in the <Node IP address>.tar.gz format. All compressed files are compressed and named in the <yyyy-MM-dd_HH-mm-ss>.tar.gz format and saved in the /var/log/Bigdata/audit/bk/ directory on the active management node. In addition, the standby management node saves a copy of the file.

By default, a maximum of 90 OMS backup files can be retained. This section describes how to configure the maximum number.

Notes and Constraints

This section applies only to MRS 3.x or later.

Configuring the Number of Local Backups of MRS Cluster Audit Logs

  1. Log in to the active OMS node in the cluster as user root.

    Change the number of audit log backup files only on the active OMS node. Do not change the number on the standby OMS node. Otherwise, the cluster may fail to work properly.

  2. Run the following command to switch to user omm:

    su - omm

  3. Run the following command to switch to the required directory:

    cd ${BIGDATA_HOME}/om-server/om/sbin

  4. Run the following command to change the maximum number of audit log backup files to be retained:

    ./modifyLogConfig.sh -m Maximum number of audit log backup files that can be retained

    The default value is 90. The value ranges from 0 to 365. A larger value means to consume more disk space.

    If the following information is displayed, the operation is successful:

    Modify log config successfully