Date: Mon, 4 Mar 2002 17:38:32 -0300 (GRNLNDST) From: Marcio d'Avila Scheibler <marcio@cpd.ufsm.br> To: freebsd-questions@FreeBSD.ORG Subject: Re: Re[2]: newsyslog/rotatelog Message-ID: <Pine.A41.4.05.10203041733490.14896-100000@saigon.cpd.ufsm.br> In-Reply-To: <8834995732.20020304211718@Weenink.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> Hello alexus, > > What if you use some sort of monthly cron job that runs a shellscript > a little better than: > > apachectl stop > tar -zcvf /backup/accesslog`date`.tgz /path/to/httpd-access.log > cp dev/null /path/to/httpd-access.log > apachectl start > Have you tried logrotate package (sysutils section) ? You add logrotate command to your crontab, then in logrotate.conf you define a pre-rotate section with commands (apachectl stop) and a post-rotate section (apachectl start). It manages gzip and version numbers for you. log -> log.0 -> log.1.gz -> log.2.gz and so on... p.s. I lost the beginning of this thread. Sorry if logrotate package was already menshioned there... ------------------------------------------------------------------------------ Marcio d'Avila Scheibler - Divisao de Suporte (marcio@cpd.ufsm.br) Centro de Processamento de Dados - Campus Universitario - CEP 97105-900 Universidade Federal de Santa Maria - RS - Brasil ============================================================================= To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.A41.4.05.10203041733490.14896-100000>