Hier werden die Unterschiede zwischen zwei Versionen gezeigt.
admin_grundlagen:logrotate [2010/11/26 13:31] 127.0.0.1 Externe Bearbeitung |
admin_grundlagen:logrotate [2018/10/09 19:16] |
||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
- | Vorraussetzung: [[cron]] | ||
- | * ''/etc/logrotate.conf'' | ||
- | * ''/etc/logrotate.d/*'' | ||
- | |||
- | ===== Neue Logdatei zu logrotate hinzufügen ===== | ||
- | === Debian 5.0 === | ||
- | ''/etc/logrotate.d/ingo.log'' : | ||
- | <file> | ||
- | /var/log/ingo.log { | ||
- | compress | ||
- | size=+10 | ||
- | postrotate | ||
- | /etc/init.d/rsyslog reload > /dev/null | ||
- | endscript | ||
- | } | ||
- | </file> | ||
- | === SuSE === | ||
- | ''/etc/logrotate.d/ingo.log'' : | ||
- | <file> | ||
- | /var/log/ingo.log { | ||
- | compress | ||
- | size=+10 | ||
- | postrotate | ||
- | /etc/init.d/syslog reload > /dev/null | ||
- | endscript | ||
- | } | ||
- | </file> | ||
- | |||
- | |||
- | ==== testen ==== | ||
- | echo 12345678901234567890 >> /var/log/ingo.log | ||
- | logrotate /etc/logrotate.conf | ||
- | ls /var/log/ingo.log* | ||
- | |||
- | |||
- | |||