[ZODB-Dev] Packing BIG fat Data.fs

Steve Spicklemire steve@spvi.com
Fri, 31 Aug 2001 08:21:40 -0500


Hi Fritz,

	I have a cron job, borrowing heavily from the rsync howto, that 
uses rsync to backup Data.fs and Client.py to pack the database. 
Something like this:

ARCHTOP="/home/steve/archive/zope/"
CRONDIR="/home/steve/crons"
DOW=`date +%A`
ARCHDIR="${ARCHTOP}${DOW}"
RSYNC="/usr/local/bin/rsync"
ZCLIENT="/usr/local/bin/python 
/usr/local/etc/Zope2/lib/python/ZPublisher/Client.py"
. ${CRONDIR}/auth.conf

#
# Insure Our Day-of-Week Directory Exists
[ -d ${ARCHDIR} ] || mkdir ${ARCHDIR} || {
     echo "Could Not Create Day-of-Week Directory: ${ARCHDIR}" ; exit 1
}


THISZOPE="Zope2"
THISZOPEDIR="/usr/local/etc/${THISZOPE}"
THISARCHDIR="${ARCHDIR}/${THISZOPE}"

[ -d ${THISARCHDIR} ] || mkdir ${THISARCHDIR} || {
     echo "Could Not Create Zope Directory: ${THISARCHDIR}" ; exit 1
}

. ${THISZOPEDIR}/zope.conf

THISZPORT=$(($ZPORT + 80))

#
${RSYNC}  -q -u -t -p -o -g ${THISZOPEDIR}/var/Data.fs ${THISARCHDIR}
#
#
# pack database...
#
#
${ZCLIENT} -u ${ZAUTH} 
http://localhost:${THISZPORT}/Control_Panel/manage_pack days:float=0
#

$ZAUTH is defined in auth.conf, and ZPORT is defined in each Zope dirs 
zope.conf. Obviously you'll need to edit paths to taste..

-steve

On Friday, August 31, 2001, at 05:28 AM, Fritz Mesedilla wrote:

> Usually it takes 2 days to reach 2GB. This means I manually compress 
> Data.fs every 2 days.
> I hope you can help me lessen the work here.
>
> Is there a way that I can cron the compression? Thanks.
>
> Fritz Mesedilla
> Systems Administrator