Index: openacs-4/packages/acs-core-docs/www/backup-recovery.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/backup-recovery.html,v diff -u -r1.15 -r1.16 --- openacs-4/packages/acs-core-docs/www/backup-recovery.html 12 Nov 2003 09:33:54 -0000 1.15 +++ openacs-4/packages/acs-core-docs/www/backup-recovery.html 19 Nov 2003 15:44:49 -0000 1.16 @@ -1,10 +1,8 @@ -Backup and Recovery

Backup and Recovery

- by Don Baccus - - with additions by Joel Aufrecht
+Backup and Recovery

Backup and Recovery

By Don Baccus with additions + by Joel Aufrecht

OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. -

Backup Strategy

+

Backup Strategy

The purpose of backup is to enable recovery. Backup and recovery are always risky; here are some steps that minimize the chance recovery is necessary: @@ -184,7 +182,7 @@ single nightly backup file which is then collected into a bigger backup file that includes the other parts of the service. The latter technique is more generally recommended. To make a new file every - night, edit the crontab file for service0:

[service0@yourserver service0]$ export EDITOR=emacs;crontab -e

Add this line to the file. The numbers and stars at the beginning are cron columns that specify when the program should be run - in this case, whenever the minute is 0 and the hour is 1, i.e., 1:00 am every day.

0 1 * * * /usr/local/pgsql/bin/pg_dump -f /var/lib/aolserver/service0/database-backup/service0_`date +\%Y-\%m-\%d`.dmp service0

If you plan to back up the whole /var/lib/aolserver/service0 directory, then it would be redundant to keep a history of database backups. In that case, set up the cron job to overwrite the previous backup each time:

0 1 * * * /usr/local/pgsql/bin/pg_dump -f /var/lib/aolserver/service0/database-backup/service0_nightly.dmp service0

A full Backup/Recovery cycle

On a test service, make sure that your backup-recovery process work. After backing up the database and file system, delete the service as detailed below and then recover it.

Other Backup Strategies

Earlier strategies, included here because this section + night, edit the crontab file for service0:

[service0@yourserver service0]$ export EDITOR=emacs;crontab -e

Add this line to the file. The numbers and stars at the beginning are cron columns that specify when the program should be run - in this case, whenever the minute is 0 and the hour is 1, i.e., 1:00 am every day.

0 1 * * * /usr/local/pgsql/bin/pg_dump -f /var/lib/aolserver/service0/database-backup/service0_`date +\%Y-\%m-\%d`.dmp service0

If you plan to back up the whole /var/lib/aolserver/service0 directory, then it would be redundant to keep a history of database backups. In that case, set up the cron job to overwrite the previous backup each time:

0 1 * * * /usr/local/pgsql/bin/pg_dump -f /var/lib/aolserver/service0/database-backup/service0_nightly.dmp service0

A full Backup/Recovery cycle

On a test service, make sure that your backup-recovery process work. After backing up the database and file system, delete the service as detailed below and then recover it.

Other Backup Strategies

Earlier strategies, included here because this section hasn't been fully updated yet.

Set Up Nightly Oracle Exports

Edit the backup script to save the backup file in /var/lib/aolserver/service0/database-backup. While you're working with Oracle, you should configure it to do @@ -272,4 +270,4 @@ [service0@localhost service0]$ exit

su - service0
 cd /var/lib/aolserver/service0
-cvs up -r current
($Id$)
View comments on this page at openacs.org
+cvs up -r current
($Id$)
View comments on this page at openacs.org