#551888 logrotate: should use dateext as default

Package:
logrotate
Source:
logrotate
Description:
Log rotation utility
Submitter:
Guillaume Allegre
Date:
2011-10-26 15:06:03 UTC
Severity:
wishlist
#551888#5
Date:
2009-10-21 14:04:08 UTC
From:
To:
Please consider enable "dateext" as default in /etc/logrotate.conf

I know it's a change for numerous installations, but I think
it really solves more problems than it can cause :
- no rename, so no race condition between rotated files
- easier to cope with backup systems
- easier rules for filesystem alteration checkers like aide, samhain...

#551888#10
Date:
2010-04-05 00:16:02 UTC
From:
To:
Hi.

I think I dislike the idea...
I think of the rotate log files as of "parts of one big file"... so the
".number" is semantically like "part-number"...

Date would only have the meaning everything before this date but after
the date of the previously rotated file (if there is any).
But there can be huge gaps between those dates and the actual entries in
the files.
Why should there be race conditions? Only logrotate rotates the
logfiles. And using a date does not solve the problem that programs
might still write to the "old" files.
Could be true (have no idea about),.. but logs are usually not that
backup critical.
But even with dates you will run into troubles with IDS as the files are
removed at some point.



Cheers,
Chris.

#551888#15
Date:
2011-04-06 19:14:59 UTC
From:
To:
I run a bunch of virtual servers under OpenVZ.  Some hold quite a few
logfiles.  If these logfiles are named by date, then the migration of
virtual servers (which uses rsync) is shortened considerably.

And yes, it would help with backups (those using rsync and incremental tar
are the most obvious to me).

And it would have the nice advantage that the alphabetical listing would be
chronological too.


In fact I always add dateext to logrotate.  It'd be nice if it came with it
enabled by default.



Cheers,
adc

#551888#20
Date:
2011-04-06 20:12:26 UTC
From:
To:
Others may prefer the existing way.  It's easy to change the default
on a system by putting "dateext" in /etc/logrotate.conf

Certainly, it shouldn't be forced on anyone, as a system which has
been using nodateext (the default) for any time will have old rotated
log files that get orphaned (ie. never expired) when a system is
forcibly changed to dateext.

#551888#25
Date:
2011-10-26 14:58:27 UTC
From:
To:
I agree completely.  dateext should be the default.

Look at all the wishlist bugs regarding sorting
that would not be filed if dateext was the default.

FWIW it's now the default on RH systems.

(If necessary allow %H and %S to be used in dateformat to
better support more frequent rotation and push
the patch upstream.)

Regards,

Karl <kop@meme.com>
Free Software:  "You don't pay back, you pay forward."
                 -- Robert A. Heinlein