Bug 144614 - weekly log rotation
Summary: weekly log rotation
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: logrotate
Version: 5
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Peter Vrabec
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-01-09 20:28 UTC by William H. Haller
Modified: 2007-11-30 22:10 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-08-24 12:37:32 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description William H. Haller 2005-01-09 20:28:37 UTC
logrotate 3.7.1.2 and earlier

It would make more sense to me to use the following test for when to
rotate a log entry - line 431 and ff.

            state->doRotate = ((now.tm_wday ==
state->lastRotated.tm_wday) &&
                               ((mktime(&now) -
mktime(&state->lastRotated)) >
                                (6 * 24 * 3600)));

That way, you can configure your logrotate.status file to have logs
rotate on a particular day of the week and it will happen if at least
1 week has passed from the last log rotate - but will stay on the same
day. On the rare times that the system is down on the logrotate day,
they wouldn't rotate that week. You would be back on track the next
week or could do a force in those situations. Otherwise, you stay on
your schedule instead of everything happening on Sunday morning.

Comment 1 William H. Haller 2006-05-02 00:43:50 UTC
Change back to future feature and update to reflect still the same in FC5

Comment 2 Peter Vrabec 2006-08-24 12:37:32 UTC
Sorry, I don't want to change it your way. It doesn't make sense to rotate logs only on 
particular day. For me make more sense to rotate logs if more than a week has passed since 
the last rotation.


Note You need to log in before you can comment on or make changes to this bug.