View previous topic :: View next topic |
Author |
Message |
grant123 Veteran
Joined: 23 Mar 2005 Posts: 1080
|
Posted: Mon Jul 15, 2013 10:46 am Post subject: logrotate and 2-digit suffix |
|
|
Is there a way to have logrotate write a 2-digit suffix to rotated files instead of 1-digit? I keep 30 rotated logs so 1-9 are out of order. |
|
Back to top |
|
|
cwr Veteran
Joined: 17 Dec 2005 Posts: 1969
|
Posted: Tue Jul 16, 2013 8:53 am Post subject: |
|
|
Use "logrotate start X", or a postrotate script, or a date suffix, or patch the logrotate source.
Will |
|
Back to top |
|
|
grant123 Veteran
Joined: 23 Mar 2005 Posts: 1080
|
Posted: Tue Jul 16, 2013 9:44 am Post subject: |
|
|
Quote: | Use "logrotate start X" |
Would 'start 00' in logrotate.conf accomplish this?
Quote: | or a postrotate script |
postrotate is only allowed inside a log file definition which is too much of a hassle.
I like this idea. I just added dateext and dateyesterday to logrotate.conf. I had previously decided not to do this so that webalizer would know where to look for yesterday's log file, but $(date --date=yesterday +%Y%m%d) took care of that.
Quote: | or patch the logrotate source |
Over my head. |
|
Back to top |
|
|
|