6 月 092010
 

原文: How i configure logrotate to not delete my log files after rotation? - Server Fault

In your logrotate.conf (or the equivilent logrotate.d file), change the line that says "

rotate 10

(your number may be different) to a bigger number. That will tell it to keep that many days of logs. You can make it 36500, which would last you 100 years.

6 月 092010
 

原文: logrotate rename files with date - Server Fault

In /etc/logrotate.conf or /etc/logrotate.d/lighttpd, or the proper file if anywhere else, add dateext to the stanza you want to apply date suffixes.

More information from logrotate man page:

dateext

Archive old versions of log files adding a daily extension like YYYYMMDD instead of simply adding a number.