Bug 6998 - logrotate compress option creates files exponentially
logrotate compress option creates files exponentially
Product: Red Hat Linux
Classification: Retired
Component: logrotate (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Erik Troan
Depends On:
  Show dependency treegraph
Reported: 1999-11-14 15:15 EST by Matthew Saltzman
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2000-02-24 12:28:29 EST
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 Matthew Saltzman 1999-11-14 15:15:09 EST
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 09:32:59 EST
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 12:28:59 EST
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.