> If this is the case, will I have to compress the just-rotated
> logfile in the postrotate script if I want to copy a compressed file?

The answer is probably "yes".  The following rule works on an
uncompressed file:

/var/log/phantom/phantom.log {
        daily
        missingok
        rotate 52
        copytruncate
        compress
        nodelaycompress
        create 644 tomcat4 nogroup
        postrotate
                if [ -e /var/log/phantom/phantom.log.1 ] ; then 
                    scp -Bq -i /home/phantom/.ssh/id_rsa
/var/log/phantom/phantom.log.1 [EMAIL PROTECTED]:log/phantom-`date
+"%Y-%m-%d"`.log
                fi
        endscript
}

The uncompressed file does not appear after logrotate executes, leading
me to believe that logrotate takes the following steps:

        1. prerotate
        2. rotate
        3. postrotate
        4. compress

ian.



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to