PDA

View Full Version : Very Large AMREST-SERVER.YYYYMMDDHHMMSS.DEBUG files



Rajesh.G
January 22nd, 2020, 11:54 AM
Zmanda saves the debug logs under /var/log/Amanda/<backupset name>. However users faced issues related to AMREST-SERVER logs size growing rapidly and occupying the disk. AMREST logs contains info category logs and this feature is defined in core Amanda.

Fix

Below is the work around to reduce the AMREST logs size. Since, collecting logs is the feature of core Amanda, we cannot change from user end without code modification.

Add the below script in the cronjob for periodical clearance of AMREST logs which are larger than 1GB

#!/bin/bash
files=`find /var/log/amanda/server/ -name "amrest-server*" -size +1G`
for i in $files
do
echo > $i
done

copy the above script to "/opt/zmanda/amanda/scripts" with below command

#cp Zmanda_remove_largelogs.sh /opt/zmanda/amanda/scripts/

Login as root user and edit the cronjob with below command

#crontab -e

Update cronjob as below

[B]5 4 * * * /usr/bin/sh /opt/zmanda/amanda/scripts/<NAME OF SCRIPT FILE>.sh/B]