Portál AbcLinuxu, 9. května 2025 05:55
daily rotate 735 create compressLen dodam, ze log subor, o ktory mi ide sa nenachadza v separatnej konfiguracii - mal by sa rotovat podla globalnej konfiguracie.
A co říká $ grep -ri mail.log /etc/logrotate.d/
?
Etch má v backports balíček rsyslog
a ten obsahuje /etc/logrotate.d/rsyslog
, ve kterém je právě definice pro mail.log
.
reading config file /etc/logrotate.conf including /etc/logrotate.d reading config file acpid reading config info for /var/log/acpid reading config file aptitude reading config info for /var/log/aptitude reading config file dpkg reading config info for /var/log/dpkg.log reading config file lighttpd reading config info for /var/log/lighttpd/*.log reading config info for /var/log/wtmp reading config info for /var/log/btmp Handling 6 logs rotating pattern: /var/log/acpid weekly (4 rotations) empty log files are rotated, old logs are removed considering log /var/log/acpid log does not need rotating rotating pattern: /var/log/aptitude monthly (6 rotations) empty log files are not rotated, old logs are removed considering log /var/log/aptitude log /var/log/aptitude does not exist -- skipping rotating pattern: /var/log/dpkg.log monthly (12 rotations) empty log files are not rotated, old logs are removed considering log /var/log/dpkg.log log does not need rotating rotating pattern: /var/log/lighttpd/*.log weekly (12 rotations) empty log files are not rotated, old logs are removed considering log /var/log/lighttpd/access.log log does not need rotating considering log /var/log/lighttpd/error.log log does not need rotating not running shared postrotate script, since no logs were rotated rotating pattern: /var/log/wtmp monthly (1 rotations) empty log files are rotated, old logs are removed considering log /var/log/wtmp log does not need rotating rotating pattern: /var/log/btmp monthly (1 rotations) empty log files are rotated, old logs are removed considering log /var/log/btmp log does not need rotating
A v té globální konfiguraci je to rotate 735?Tu je cely /etc/logrotate.conf
# see "man logrotate" for details # rotate log files weekly daily # keep 4 weeks worth of backlogs rotate 735 # create new (empty) log files after rotating old ones create # uncomment this if you want your log files compressed compress # packages drop log rotation information into this directory include /etc/logrotate.d # no packages own wtmp, or btmp -- we'll rotate them here /var/log/wtmp { missingok monthly create 0664 root utmp rotate 1 } /var/log/btmp { missingok monthly create 0664 root utmp rotate 1 } # system-specific logs may be configured here
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.