Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

my logrotate works perfectly, except for this configuration:

/var/awdata/awarchive.*.log 
/var/log/awstats.log 
{
        rotate 12
}

this is my logrotate -d /etc/logorate.conf

considering log /var/awdata/awarchive.domain1.it.log
   log needs rotating

and then...

rotating log /var/awdata/awarchive.domain1.it.log, log->rotateCount is 4
dateext suffix '-20120517'
glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
fscreate context set to unconfined_u:object_r:var_t:s0
renaming /var/awdata/awarchive.domain1.it.log to /var/awdata/awarchive.domain1.it.log-20120517
creating new /var/awdata/awarchive.domain1.it.log mode = 0666 uid = 99 gid = 501

logrotate seems works perfectly, but it not does what it write :-(

==

ls -lah /var/awdata/domain1

about domain1...

-rw-rw-rw-. 1 nobody nogroup 4.7G May 17 17:16 /var/awdata/awarchive.domain1.it.log
-rw-rw-rw-. 1 nobody nogroup 7.6G May  9 04:16 /var/awdata/awarchive.domain1.it.log-20120509

the only rotate log *-20120509 was forced with -f option

==

[root@lnx1 awdata]# ls -ld /var/awdata
drwxr-xr-x. 2 nobody nogroup 188416 May 17 18:52 /var/awdata

any idea?

share|improve this question
1  
can you provide the output of ls -lah /var/awdata/ so we can see what actually was rotated? –  Tom H May 17 '12 at 11:53
    
thanks for your hint tom :-) –  Roberto May 17 '12 at 16:27
1  
-d Turns on debug mode and implies -v. In debug mode, no changes will be made to the logs or to the logrotate state file. –  Jiri Xichtkniha May 17 '12 at 16:37
    
Be careful, if you do not have space in filesystem, it won't be rotated, this is my experience. –  Jiri Xichtkniha May 17 '12 at 16:38
    
Is /var/awdata writable for logrrotate? It wants create the files with uid 99 gid 501 while the existing files' owner is nobody/nogroup. Maybe you need to chmod /var/awdata to 1777 mode? Show ls -ld /var/awdara. –  ott-- May 17 '12 at 16:43
show 4 more comments

1 Answer

Note that logrotate -d turns on “debug” mode, where logrotate reports what it would do if the -d flag was not present.

Try using logrotate -v, which applies the actions it describes, then come back with any further issues.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.