Hallo Herr Keppler,
danke für das Update.
Für mich noch eine Verständnisfrage:
Die error.log wird weiterhin nicht rotiert und gelöscht, richtig?
Zudem werden noch immer nicht alle alten Logfiles gelöscht.
Ich hätte erwartet, dass die *.gz Dateien mit altenLogfiles gelöscht werden.
Code
-rw-r--r-- 1 root root 264K Mai 17 10:22 access.log
-rw-r--r-- 1 root root 1,1M Mai 17 06:15 access.log.1
-rw-r--r-- 1 root root 3,1M Mär 1 06:16 access.log.3.gz
-rw-r--r-- 1 root root 5,0M Feb 1 06:26 access.log.4.gz
-rw-r--r-- 1 root root 9,9M Mär 10 2016 error.log
drwxrwx--- 2 webh_158 webh_158 4,0K Mai 15 15:14 priv
Die Ausgabe von logrotate -df /etc/logrotate.d/liveconfig-vhosts
Code
rotating pattern: /var/www/webh_158/logs/access.log forced from command line (1 rotations)
empty log files are not rotated, old logs are removed
considering log /var/www/webh_158/logs/access.log
log needs rotating
rotating log /var/www/webh_158/logs/access.log, log->rotateCount is 1
dateext suffix '-20180517'
glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
compressing log with: /bin/gzip
renaming /var/www/webh_158/logs/access.log.1.gz to /var/www/webh_158/logs/access.log.2.gz (rotatecount 1, logstart 1, i 1),
renaming /var/www/webh_158/logs/access.log.0.gz to /var/www/webh_158/logs/access.log.1.gz (rotatecount 1, logstart 1, i 0),
renaming /var/www/webh_158/logs/access.log to /var/www/webh_158/logs/access.log.1
running postrotate script
running script with arg /var/www/webh_158/logs/access.log : "
/usr/bin/killall -HUP lclogsplit
"
removing old log /var/www/webh_158/logs/access.log.2.gz
error: error opening /var/www/webh_158/logs/access.log.2.gz: Datei oder Verzeichnis nicht gefunden
Alles anzeigen
Es scheint als ob Logrotate an der fehlenden access.log.2.gz Datei abbricht und dann nicht mehr weiter bereinigt. Den Fehler kann ich an mehreren Accounts so nachvollziehen.