Export Log-Files

Admin

How to export the log files
Extract the log-rotate package.

tar xfv log-rotate.tar

Copy the logrotate config files in /etc/logrotate.d/. cp etc/logrotate.d/* /etc/logrotate.d/

Start the script to create the directorys for the Logfiles.

./cronscript/dircreate-cron.sh

Mount the Filesystem where the log-files will be saved.

mount -o tcp -t nfs srv01:/X/backup/servername/log /var/log/backup/

Start the script to create the directorys also on mounted filesystem for the Logfiles.

./cronscript/dircreate-cron.sh

Modify and start

vi cronscript/older-log.sh ./cronscript/older-log.sh Modify the cronjob less cron/snmp-fed-jboss.cron crontab -e Start manual older-log.sh

./cronscript/older-log.sh

Now every old Log-File should be compressed and moved to the log file storage.

Autostart mount of the log-file-system
Edit autostart file

vi /etc/fstab

Add the following line

srv01.mpdl.mpg.de:/X/backup/servername/log /var/log/backup/ nfs rw,addr=134.76.28.240 0 0