Bug 144614 - weekly log rotation
weekly log rotation
Product: Fedora
Classification: Fedora
Component: logrotate (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Peter Vrabec
: FutureFeature
Depends On:
  Show dependency treegraph
Reported: 2005-01-09 15:28 EST by William H. Haller
Modified: 2007-11-30 17:10 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-08-24 08:37:32 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description William H. Haller 2005-01-09 15:28:37 EST
logrotate 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-01 20:43:50 EDT
Change back to future feature and update to reflect still the same in FC5
Comment 2 Peter Vrabec 2006-08-24 08:37:32 EDT
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.