Index: openacs-4/packages/acs-core-docs/www/snapshot-backup.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/snapshot-backup.html,v diff -u -r1.5 -r1.6 --- openacs-4/packages/acs-core-docs/www/snapshot-backup.html 22 Jun 2004 12:54:10 -0000 1.5 +++ openacs-4/packages/acs-core-docs/www/snapshot-backup.html 16 Feb 2005 00:21:03 -0000 1.6 @@ -1,4 +1,4 @@ -
This section describes how to make a one-time backup and +
This section describes how to make a one-time backup and restore of the files and database. This is useful for rolling back to known-good versions of a service, such as at initial installation and just before an upgrade. First, you back up the @@ -7,11 +7,11 @@ including the AOLserver config files, is then in tree for regular file system backup.
Back up the database to a file.�
Download the backup script. Save the file export-oracle.txt as - /tmp/export-oracle.txt + /var/tmp/export-oracle.txt
Login as root. The following commands will install the export script:
[joeuser ~]$ su - -[root ~]# cp /tmp/export-oracle.txt /usr/sbin/export-oracle +[root ~]# cp /var/tmp/export-oracle.txt /usr/sbin/export-oracle [root ~]# chmod 700 /usr/sbin/export-oracle
Setup the export directory; this is the directory where backups will be stored. We recommend the directory @@ -86,7 +86,7 @@ specifies the starting point for backup. Tar defaults to recursive backup.
[root root]# su - $OPENACS_SERVICE_NAME [$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ tar -cpsz --exclude /var/lib/aolserver/$OPENACS_SERVICE_NAME/etc/daemontools/supervise \ - --file /tmp/$OPENACS_SERVICE_NAME-backup.tar.gz /var/lib/aolserver/$OPENACS_SERVICE_NAME/ + --file /var/tmp/$OPENACS_SERVICE_NAME-backup.tar.gz /var/lib/aolserver/$OPENACS_SERVICE_NAME/ tar: Removing leading `/' from member names [$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$
Suffer a catastrophic failure on your production system.�(We'll simulate this step)
[root root]# svc -d /service/$OPENACS_SERVICE_NAME
[root root]# mv /var/lib/aolserver/$OPENACS_SERVICE_NAME/ /var/lib/aolserver/$OPENACS_SERVICE_NAME.lost
@@ -109,7 +109,7 @@
tarball and supporting software) and repeating the install
guide. Recreate the service user ($OPENACS_SERVICE_NAME).
Restore the OpenACS files and database backup file.
[root root]# su - $OPENACS_SERVICE_NAME [$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ cd /var/lib/aolserver -[$OPENACS_SERVICE_NAME aolserver]$ tar xzf /tmp/$OPENACS_SERVICE_NAME-backup.tar.gz +[$OPENACS_SERVICE_NAME aolserver]$ tar xzf /var/tmp/$OPENACS_SERVICE_NAME-backup.tar.gz [$OPENACS_SERVICE_NAME aolserver]$ chmod -R 775 $OPENACS_SERVICE_NAME [$OPENACS_SERVICE_NAME aolserver]$ chown -R $OPENACS_SERVICE_NAME.web $OPENACS_SERVICE_NAME
Restore the database
Oracle.�
Set up a clean Oracle database user and tablespace with the same names as the ones exported from (more information).
Invoke the import command
imp $OPENACS_SERVICE_NAME/$OPENACS_SERVICE_NAME FILE=/var/lib/aolserver/$OPENACS_SERVICE_NAME/database-backup/nighty_backup.dmp FULL=Y
Postgres.�If the database user does not already exist, create it.
[root root]# su - postgres