Posts

Showing posts with the label logrotator

Use Logrotator for managing slony files.

Logrotator is a small C program which is well written and available on most of the UNIX based OS. It allows automatic rotation, compression of logfiles and removal of old logfiles. This small file can be use to manage applications logfiles. It can also use for managing slony logfiles. For managing logfiles using logrotator user has to make a logrotator conf file, and can be scheduled in crontab for managing logile. Let see how you can make a logrotator configuration file for slony. I have slony master/slave daemon running on my slave maching has following location for slony logfiles: /opt/PostgresPlus/9.0AS/slony_test/slony1/node1 -- For master /opt/PostgresPlus/9.0AS/slony_test/slony1/node2 -- For slave. For managing logfile, user can make logrotator configuration file similar to given below: Configuration filename: /etc/logrotate.d/slonylogfiles "/opt/PostgresPlus/9.0AS/slony_test/slony1/node[12]/*.log" { rotate 5 mail vibhor.aim@gmail.com