Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 6998

Summary: logrotate compress option creates files exponentially
Product: [Retired] Red Hat Linux Reporter: Matthew Saltzman <mjs>
Component: logrotateAssignee: Erik Troan <ewt>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-02-24 17:28:29 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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/* {
    	    compress
    	    weekly
	}

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.