On Sunday 05 August 2007 08:36, Jakob wrote:

> Thanks for that hint, but there was nothing about logrotate in dead.letter.
> logrotate itself works fine for me but I want the messages file erased
> after rotating and start with a new file and that doesn't work.
> any more ideas?

I am not sure I understand "that doesn't work":

It does not rotate the message log file at all?
It rotates it but does not create a new empty message log file after rotation?  

Anyway, look at your script in /etc/logrotate.d/syslog-ng:

Your entry for olddir is redundant.  The rotated logs will remain in 
the /var/log directory anyway.  Use olddir if you want to place them 
somewhere else; e.g. /var/log/old_messages, but make sure that the new 
directory old_messages is owned by root:root.

As already commented by Matthias Guede, the entry "copy" is not appropriate if 
you want to actually rotate the log file as opposed to just copy it.

The entry "create 0600 root root" is also redundant as you already specify 
create as a default option in your /etc/logrotate.conf.  (This may mess 
things up.)

Finally, the size at 5M is relatively large so rotation is not going to take 
place that often unless you force it.

HTH.
-- 
Regards,
Mick

Attachment: pgpYNnzpSW2GX.pgp
Description: PGP signature

Reply via email to