How do I backup Data.fs with cp?
Up to Table of Contents
This is the cron I use (found somewhere years ago) that makes a backup to a new directory every night. Throw it in /etc/cron.daily/ on a unix box (RedHat) and you are good to go.
::::::::::::::
/etc/cron.daily/zope_data_backup.cron
::::::::::::::
#!/bin/sh
########################################
# File: /etc/cron.daily/zope_data_backup.cron
#
# Backup Zope Database Daily
########################################
#
ARCHTOP="/mnt/drive2/archive/zope/"
DOW=`date +%A`
ARCHDIR="${ARCHTOP}${DOW}"
#
# Insure Our Day-of-Week Directory Exists
[ -d ${ARCHDIR} ] || mkdir ${ARCHDIR} || {
echo "Could Not Create Day-of-Week Directory: ${ARCHDIR}" ; exit 1
}
#
cp -p /usr/local/zope/var/Data.fs ${ARCHDIR}
#
# ln -sf ${ARCHDIR} ${ARCHTOP}Current
#
exit 0
















