Posts

Showing posts with the label logrotate

Fixing Logrotate on Ubuntu Jaunty Server Edition

After about one year of having used the VPS based on Ubuntu Jaunty, recently I had the need to go look at my Apache logs. Now Apache log on my desktop machine are always nicely rotated by logrotate without me having to do anything. However on the server, I found a gigantic 1.2 GB other_vhosts_access.log staring at me with no rotation whatsoever in last 1 year. So I began to learn about logrotate. Running logrotate by hand produced the following which was obviously not true. abhaya@www$ sudo logrotate -d /etc/logrotate.conf rotating pattern: /var/log/apache2/*.log weekly (52 rotations) empty log files are not rotated, old logs are removed considering log /var/log/apache2/access.log log does not need rotating considering log /var/log/apache2/error.log log does not need rotating considering log /var/log/apache2/other_vhosts_access.log log does not need rotating The contents of the status file (/var/lib/logrotate/status) which logrotate uses to determine which log files need ...