37.6 Backing Up the Log Files

You can take a backup of /var/opt/novell/log/zenworks/tomcat/catalina.out or any other log file using the logrotate utility.

The logrotate utility is available with the operating system. The utility eases the administration of systems that generate large numbers of log files. It allows automatic rotation, compression, and removal of log files. Each log file might be handled daily, weekly, monthly, or when it grows too large. For more information on the usage of the logrotate utility, see the logrotate man page.

ZENworks 7.3 Linux Management with IR4provides a logrotate file, /etc/logrotate.d/zlm-server-logrotate, on the server. The logrotate utility uses the file to rotate the existing and the new log files created in /var/opt/novell/log/zenworks on the ZENworks Linux Management server. These server log files are compressed with date extension, rotated, and backed up daily for 33 days before being discarded.

The tomcat server logs rotated within the tomcat directory are not affected by the zlm-server-logrotate file. The rotation of the catalina.out log file that resides in the tomcat directory is based on its size.

To allow the rotation of the catalina.out log file, do the following:

This configures the log4j.properties file as the tomcat system logger for the ZENworks Server and tomcat events.

The configuration defined in the log4j.properties file creates a maximum of five rotating backups for the catalina.out file. The maximum size of each backup log file can be upto 100 MB.