На этот вопрос уже есть ответ:
Мой logrotate работает отлично , кроме этой конфигурации:
/var/awdata/awarchive.*.log
/var/log/awstats.log
{
rotate 12
}
Это мой logrotate -d /etc/logorate.conf
вывод:
considering log /var/awdata/awarchive.domain1.it.log
log needs rotating
, а затем:
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, кажется, работает отлично, но не то, что Я написал. : - (
==
ls -lah /var/awdata/*domain1*
О 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
Единственный журнал ротации * -20120509 был принудительно выполнен с помощью параметра -f
.
[root@lnx1 awdata]# ls -ld /var/awdata
drwxr-xr-x. 2 nobody nogroup 188416 May 17 18:52 /var/awdata
Есть идеи?
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.