Bug 6998 - logrotate compress option creates files exponentially
Summary: logrotate compress option creates files exponentially
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: logrotate
Version: 6.0
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Erik Troan
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 1999-11-14 20:15 UTC by Matthew Saltzman
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2000-02-24 17:28:29 UTC

Attachments (Terms of Use)

Description Matthew Saltzman 1999-11-14 20:15:09 UTC
Logrotate with the compress option appears to rotate compressed logs
as distinct logs.  Thus, for example, file.log is rotated to file.log.1,
then compressed to file.log.1.gz.  In the next pass file.log.1.gz is
rotated to file.log.1.gz.1 and compressed to file.log.1.gz.1.gz.  All
compressed logs are rotated and compressed again at each generation,
thus creating a runaway collection of rotated files.  My junkbuster
log file directory contained 73,000 files when I finally figured out
why logrotate ws taking over 12 hours to run.

Comment 1 Matthew Saltzman 1999-11-15 14:32:59 UTC
The Junkbuster logrotate file is:

	/var/log/junkbuster/* {

It appears that the existence of the wildcard is the cause of the problem.
The immediate difficulty can be remedied by replacing the wildcard with
the base filename.

So now this becomes a feature request.  Is there a way to specify to logrotate
that all base logfiles in a subdirectory are to be rotated without either
naming them all or running into this problem of starting rotation sequences
for rotated logs?

Thanks, and sorry to bother y'all.

Comment 2 Erik Troan 2000-02-24 17:28:59 UTC
Either a tighter glob pattern or using a "olddir" entry will work around this.

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