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.2.7 -r1.15.2.8 --- openacs-4/packages/acs-core-docs/www/backup-recovery.html 18 Dec 2003 10:04:26 -0000 1.15.2.7 +++ openacs-4/packages/acs-core-docs/www/backup-recovery.html 11 Jan 2004 12:45:45 -0000 1.15.2.8 @@ -1,8 +1,8 @@ -
Back up the file system.�Back up all of the files in the service, including the database backup file but excluding the auto-generated supervise directory, which is unneccesary and has complicated permissions.
In the tar command,
c create a @@ -155,12 +155,13 @@ [service0 aolserver]$ tar xzf /tmp/service0-backup.tar.gz [service0 aolserver]$ chmod -R 775 service0 [service0 aolserver]$ chown -R service0.web service0
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 service0/service0 FILE=/var/lib/aolserver/service0/database-backup/nighty_backup.dmp FULL=Y
Postgres.�Because of a bug in Postgres backup-recovery, database objects are not guaranteed to be created in the right order. To compensate, we pre-creating some critical items first, which leads to some harmless errors.
[root root]# su - postgres + tablespace with the same names as the ones exported from (more information).
Invoke the import command
imp service0/service0 FILE=/var/lib/aolserver/service0/database-backup/nighty_backup.dmp FULL=Y
Postgres.�If the database user does not already exist, create it.
[root root]# su - postgres [postgres ~]$ createuser service0 Shall the new user be allowed to create databases? (y/n) y Shall the new user be allowed to create more new users? (y/n) y CREATE USER -[postgres ~]$ su - service0 +[postgres ~]$ exit +
Because of a bug in Postgres backup-recovery, database objects are not guaranteed to be created in the right order. In practice, running the OpenACS initialization script is always sufficient to create any out-of-order database objects. Next, restore the database from the dump file. The restoration will show some error messages at the beginning for objects that were pre-created from the OpenACS initialization script, which can be ignored.
[root root]# su - service0
[service0 ~]$ createdb service0
CREATE DATABASE
[service0 ~]$ psql -f /var/lib/aolserver/service0/packages/acs-kernel/sql/postgresql/postgresql.sql service0
@@ -192,14 +193,14 @@
(many lines omitted)
[service0 service0]$ exit
[root root]#
-su - service0
+su - service0
cd /var/lib/aolserver/service0
cvs commit -m "last-minute commits before upgrade to 4.6"
cvs tag before_upgrade_to_4_6
-exit
To restore files from a cvs tag such as the one used above:
[root root]# su - service0 +exit
To restore files from a cvs tag such as the one used above:
[root root]# su - service0
[service0 service0]$ cd /var/lib/aolserver/service0
[service0 service0]$ cvs up -r current
[service0 service0]$ exit
-su - service0
+su - service0
cd /var/lib/aolserver/service0
-cvs up -r current