[Zope] Regarding ZOPE backup procedure
BZ
bz@bwanazulia.com
Wed, 13 Nov 2002 06:50:25 -0500
I run RH Linux and here is what I do (you can tell I have lost data in=20=
the past). If you only did daily and weekly that would be pretty good.
/etc/cron.hourly/zope_cron
#!/bin/sh
########################################
# File: /etc/cron.hourly/zope_dat.cron
#
# Backup Zope Database Hourly
########################################
#
# rsync arguments:
# -q ::=3D Quiet operation, for cron logs
# -u ::=3D Update only, don't overwrite newer files
# -t ::=3D Preserve file timestamps
# -p ::=3D Preserve file permissions
# -o ::=3D Preserve file owner
# -g ::=3D Preserve file group
# -z ::=3D Compress during transfer
# -e ssh ::=3D Use the ssh utility to secure the link
#
ARCHDIR=3D"/mnt/drive2/archive/zope/hourly"
#
/usr/bin/rsync -q -u -t -p -o -g /usr/local/zope/var/Data.fs ${ARCHDIR}
#
exit 0
and daily:
#!/bin/sh
########################################
# File: /etc/cron.daily/zbackup.cron
#
# Backup Zope Database Daily
########################################
#
# rsync arguments:
# -q ::=3D Quiet operation, for cron logs
# -u ::=3D Update only, don't overwrite newer files
# -t ::=3D Preserve file timestamps
# -p ::=3D Preserve file permissions
# -o ::=3D Preserve file owner
# -g ::=3D Preserve file group
# -z ::=3D Compress during transfer
# -e ssh ::=3D Use the ssh utility to secure the link
#
ARCHTOP=3D"/mnt/drive2/archive/zope/"
DOW=3D`date +%A`
ARCHDIR=3D"${ARCHTOP}${DOW}"
#
# Insure Our Day-of-Week Directory Exists
[ -d ${ARCHDIR} ] || mkdir ${ARCHDIR} || {
echo "Could Not Create Day-of-Week Directory: ${ARCHDIR}" ; exit 1
}
#
/usr/bin/rsync -q -u -t -p -o -g /usr/local/zope/var/Data.fs ${ARCHDIR}
#
# ln -sf ${ARCHDIR} ${ARCHTOP}Current
#
exit 0
And Weekly:
#
# ln -sf ${ARCHDIR} ${ARCHTOP}Current
#
exit 0
[root@newbaby jatwood]#
[root@newbaby jatwood]#
[root@newbaby jatwood]# more /etc/cron.weekly/zope_archive.cron
#!/bin/sh
########################################
# File: /etc/cron.weekly/zope_archive.cron
#
# Backup Zope Directory
########################################
#
# tar arguments:
# -c ::=3D Create tar
# -z ::=3D Zip it up
# -f ::=3D Files
#
ARCHDIR=3D"/mnt/drive2/archive/zope/"
FILEDATE=3D`date +%Y%m%d`
TARFILE=3D"${FILEDATE}.tar.gz"
TARDIR=3D"/usr/local/zope"
#
/bin/tar cfz ${ARCHDIR}${TARFILE} ${TARDIR}
#
exit 0
BZ
On Wednesday, November 13, 2002, at 04:55 AM, Chinku Simon wrote:
> Hi,
> =A0
> I am investigating on methods to back up of a Zope CMF site.
> What could be the best possible method
> =A0
> Thanks in advance
> Chinku
> ________________________________________
> Chinku Simon
> Software Engineer,
> Infosys Technologies Limited, Bangalore.
> T +91 80=A04163889 (Direct)
> =A0=A0=A0+91 80=A08520261 X 50889
> =A0