What you are searching is
dateext
Archive old versions of log files adding a daily extension like YYYYMMDD instead of
simply adding a number.
option of logrotate
man logrotate
/var/log/httpd/access_log {
daily
dateext
missingok
rotate 31
sharedscripts
postrotate
/bin/kill -HUP `cat /var/run/httpd.pid 2>/dev/null` 2> /dev/null || true
endscript
compress
}
Main Topics
Browse All Topics





by: mj9821Posted on 2004-09-27 at 22:25:49ID: 12166698
Here is my current logrotate settings:
/var/log/httpd/access_log {
daily
missingok
rotate 31
sharedscripts
postrotate
/bin/kill -HUP `cat /var/run/httpd.pid 2>/dev/null` 2> /dev/null || true
endscript
compress
}