logrotate in centos rotiert keine Protokolle

logrotate in centos rotiert keine Protokolle

Ich verwende CentOS 8 und muss logrotatemeine Protokolle für Nginx rotieren. Die Protokolle rotieren wie erwartet, wenn ich den Befehl manuell mit " ausführe "logrotate -v /etc/logrotate.conf, aber sie werden nicht ausgeführt, wenn der cronJob ausgeführt wird. Ich habe überprüft, ob der Job cronjobausgeführt wird, indem ich die /var/log/cronProtokolldatei wie gezeigt angezeigt habe.

Oct 26 15:55:01 c22fin2 run-parts[916513]: (/etc/cron.hourly) starting 0anacron
Oct 26 15:55:01 c22fin2 anacron[916522]: Anacron started on 2023-10-26
Oct 26 15:55:01 c22fin2 anacron[916522]: Will run job `cron.daily' in 0 min.
Oct 26 15:55:01 c22fin2 anacron[916522]: Jobs will be executed sequentially
Oct 26 15:55:01 c22fin2 anacron[916522]: Job `cron.daily' started
Oct 26 15:55:01 c22fin2 run-parts[916513]: (/etc/cron.hourly) finished 0anacron
Oct 26 15:55:01 c22fin2 run-parts[916524]: (/etc/cron.daily) starting logrotate
Oct 26 15:55:01 c22fin2 run-parts[916524]: (/etc/cron.daily) finished logrotate
Oct 26 15:55:01 c22fin2 anacron[916522]: Job `cron.daily' terminated (produced output)
Oct 26 15:55:01 c22fin2 anacron[916522]: Normal exit (1 job run)

Der Status der Datei wird /var/lib/logrotate/logrotate.statusebenfalls in der Datei aktualisiert. Es scheint keinen Hinweis auf ein Problem zu geben?

verwandte Informationen