Thats also good, but how to do this ?
thnx
Firas
----- Original Message ----- From: "Fernando Rodriguez" <[EMAIL PROTECTED]> To: "'Firas A. Mubarak'" <[EMAIL PROTECTED]>; <[email protected]>
Sent: Saturday, June 23, 2007 1:27 AM
Subject: RE: [squid-users] access.log


Instead of moving only the file you can change the name using the same cron
so the name of the file will be access.log-day-month-year-hour-minute



---------------------------
Fernando Rodriguez

-----Mensaje original-----
De: Firas A. Mubarak [mailto:[EMAIL PROTECTED]
Enviado el: miƩrcoles, 20 de junio de 2007 01:19 p.m.
Para: Fernando Rodriguez; [email protected]
Asunto: Re: [squid-users] access.log

this is a very good idea i likd it thank you very much, but once it rotate
it just overwrite the previous log file.
i want to keep all the access.log files stored for 6 momths .
any ideas ?

thnx

----- Original Message ----- From: "Fernando Rodriguez" <[EMAIL PROTECTED]>
To: "'Firas A. Mubarak'" <[EMAIL PROTECTED]>;
<[email protected]>
Sent: Wednesday, June 20, 2007 5:29 PM
Subject: RE: [squid-users] access.log


I made a litle shell script that does that but instead of ftp y rsync to
another server whare the file is processed


I use centos 4 so I created an entry in crontab where I run this every 8
minutes

#!/bin/bash
rsync /var/log/squid/access.log -e ssh [EMAIL PROTECTED]:webcache1.log
cat /dev/null > /var/log/squid/access.log
squid -k rotate

Hope this helps



---------------------------
Fernando Rodriguez


-----Mensaje original-----
De: Firas A. Mubarak [mailto:[EMAIL PROTECTED]
Enviado el: miƩrcoles, 20 de junio de 2007 09:24 a.m.
Para: [email protected]
Asunto: [squid-users] access.log

Dear All,

I have to store my access.log files for 6 months. i need to log rotate the
file every 6 hours and then get it uploaded to a local FTP server
automatically.

any ideas ?

Thanks
Firas

Reply via email to