Logrotate

  • Thread starter Thread starter imagica
  • Start date Start date
I

imagica

Guest
Hallo,

wenn ich in der console ein /etc/cron.daily/logrotate ausführe, erhalte ich:

error: /etc/logrotate.conf:19 compression program /usr/bin/bzip2 is not an executable file

die logrotate sieht so aus:

PHP:
# see "man logrotate" for details
# rotate log files weekly
weekly

# keep 4 weeks worth of backlogs
rotate 4

# create new (empty) log files after rotating old ones
create

# use date as a suffix of rotated file
dateext

# uncomment this if you want your log files compressed
#compress

# uncomment these to switch compression to use gzip or another
# compression scheme
compresscmd /usr/bin/bzip2
uncompresscmd /usr/bin/bunzip2

# former versions had to have the compressext set accordingly
#compressext .bz2

# RPM packages drop log rotation information into this directory
include /etc/logrotate.d

# no packages own wtmp -- we'll rotate them here
#/var/log/wtmp {
#    monthly
#    create 0664 root utmp
#    rotate 1
#}

Wie bekomme ich bzip2 installliert/aktiviert, "#compress" ist doch nicht aktiv?

Die Logdateien werden nicht rotiert, liegt das an dem Fehler oben, oder ist die syslog falsch konfiguriert (maxage zu hoch)?


PHP:
/var/log/warn /var/log/messages /var/log/allmessages /var/log/localmessages /var/log/firewall {
    compress
    dateext
    maxage 365
    rotate 99
    missingok
    notifempty
    size +4096k
    create 640 root root
    sharedscripts
    postrotate
        /etc/init.d/syslog reload
    endscript
}


Gruß Marco
 
Hallo!
Ist denn bzip2 auf deinem System verfügbar? Was sagt ls -al /usr/bin/bzip2?

mfG
Thorsten
 
server:~ # ls -al /usr/bin/bzip2
ls: cannot access /usr/bin/bzip2: No such file or directory

Wie kann ich es denn installieren?
 
PHP:
server:~ # /etc/cron.daily/logrotate
Reload httpd2 (graceful restart)..done
Reload syslog service..done
Reload syslog service..done
Reload INET services (xinetd)...done

Danke!!!! Jetzt läufts wieder!!

Gruß
 
Back
Top