Ubuntu Logrotate

Posted on Monday, April 19, 2010 in Linux

Create logrotate file /etc/logrotate.d/example
/var/log/webserver/barsupply.log {
daily
rotate 7
missingok
compress
notifempty
#olddir will change log archive directory (not required)
olddir /var/log/example/archive
}

Register logrotate file:
#logrotate -f /etc/logrotate.d/example

View file status in logrotate:
/var/lib/logrotate/status