[opencms-dev] FYI: Backup of OpenCMS data

Jeroen Habets jeroen.habets at framfab.nl
Thu May 17 13:04:15 CEST 2001


Hi,

I've made a script to backup all the data of OpenCMS. Although one could
also backup the database (which I do as well ;-). Having the
resources in zip archives makes it a lot easier to restore a single file.

I've written a Perl script which will backup separately the userdata, the
online project, and each of the other projects into a timestamped files in a
'datestamped' subdirectory...

I've added them to my crontab so the backup runs every hour (a bit much for
production environments of course) on weekdays (probably all days in
production ;-). With a clean backup every night (removes the hourly backups,
to preserve diskspace), only this backup is logged. My crontab for the
opencms user looks like this:

bash-2.04$ crontab -l
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/tmp/crontab.5461 installed on Thu May 17 14:56:40 2001)
# (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)
0 9-21 * * 1-6  /home/opencms/bin/backup.pl /home/opencms/backups >
/dev/null 2>&1
0 23 * * 1-6    /home/opencms/bin/backup.pl /home/opencms/backups clean >>
/var/log/opencms/backup.log 2>&1

Enjoy,
Jeroen
P.S. Edit crontab with crontab -e of course...

-------------- next part --------------
A non-text attachment was scrubbed...
Name: backup.pl
Type: application/octet-stream
Size: 1690 bytes
Desc: not available
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20010517/1afe13bb/attachment.obj>


More information about the opencms-dev mailing list