Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 4 Oct 2003 06:00:01 +0100
From:      Jez Hancock <jez.hancock@munk.nu>
To:        freebsd-questions@freebsd.org
Subject:   Re: var partition is too small
Message-ID:  <20031004050001.GB2965@users.munk.nu>
In-Reply-To: <20031003140043.GB80565@darkpossum>
References:  <20031003140043.GB80565@darkpossum>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Oct 03, 2003 at 09:00:43AM -0500, Redmond Militante wrote:
> hi all
> 
> the var partition on my apache box may be too small.
> this is a problem because - 
> i originally had newsyslog set at
> 
> /var/log/httpd-access.log               644  7     100  24    B /var/run/httpd.pid 30
fwiw I have the following entry in /etc/crontab:

0   *   *   *   *   root    /home/munk/bin/sh/newsyslog.sh

where that script reads:

#!/bin/sh
YEAR=`date "+%Y"`
ROTATE_DIR=/home/munk/backup/log/$YEAR

if [ ! -d $ROTATE_DIR ]
then
	mkdir $ROTATE_DIR
fi

/usr/sbin/newsyslog -a $ROTATE_DIR

/usr/sbin/chown -R root:wheel $ROTATE_DIR \
&& /bin/chmod -R 750 $ROTATE_DIR

so the logfiles get rotated out into /home/munk/backup/log/$YEAR with
whatever compression/triggers are setup in /etc/newsyslog.conf.


-- 
Jez Hancock
 - System Administrator / PHP Developer

http://munk.nu/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031004050001.GB2965>