Index: openacs-4/packages/acs-core-docs/www/upgrade-4.5-to-4.6.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/upgrade-4.5-to-4.6.html,v diff -u -r1.4 -r1.5 --- openacs-4/packages/acs-core-docs/www/upgrade-4.5-to-4.6.html 7 Apr 2003 16:59:26 -0000 1.4 +++ openacs-4/packages/acs-core-docs/www/upgrade-4.5-to-4.6.html 24 Jun 2003 03:58:11 -0000 1.5 @@ -1,51 +1,13 @@ -Upgrading OpenACS 4.5 to 4.6

Upgrading OpenACS 4.5 to 4.6

Checklist

The required platform for OpenACS 4.6 is the same as +Upgrading OpenACS 4.5 to 4.6

Upgrading OpenACS 4.5 to 4.6

Checklist

The required platform for OpenACS 4.6 is the same as 4.5, with the excepion of OpenFTS. You now need OpenFTS 0.3.2, not 0.2. - OpenACS 4.6 does not support PostGreSQL 7.3.

Overview

OpenACS consists of files and a database schema. The files + OpenACS 4.6 does not support PostGreSQL 7.3.

Overview

OpenACS consists of files and a database schema. The files in the OpenACS 4.6 tarball include database upgrade scripts. To start the upgrade, replace your existing files with the new files and then restart the server. Then, browse to the APM, which will detect the new packages and offer to run the appropriate database upgrade scripts. After restarting the server again, the upgrade is - complete.

Figure 6.1. Assumptions in this section

name of OpenACS usernsadmin
OpenACS server nameopenacs-dev
Root of OpenACS file tree/web/openacs-dev
Database backup directory/backup/openacs/

Upgrading on Linux/Unix

  1. Make a Backup.�Back up the database and file system.

    • PostGreSQL.�Create a backup file and verify that it was created and has a reasonable size (several megabytes).

      [root@localhost root]# su - nsadmin
      -[nsadmin@localhost aolserver]$ pg_dump -f /backup/openacs/openacs_dev_before_upgrade_to_4.6.dmp openacs-dev
      -[nsadmin@localhost aolserver]$ ls -al /backup/openacs/openacs_dev_before_upgrade_to_4.6.dmp 
      --rw-rw-r--    1 nsadmin  nsadmin   4005995 Feb 21 18:28 /backup/openacs/openacs_dev_before_upgrade_to_4.6.dmp
      -[nsadmin@localhost aolserver]$ exit
      -[root@localhost root]#
      -
      su - nsadmin
      -pg_dump -f /backup/openacs/openacs_dev_before_upgrade_to_4.6.dmp openacs-dev
      -ls -al /backup/openacs/openacs_dev_before_upgrade_to_4.6.dmp
      -exit
    • Oracle - INCOMPLETE.�

    • File tree with CVS.�If you are already using CVS, you probably don't - need to do anything to back up your data. Just make - sure that your current work is checked into the system. - You can then roll back based on date - just note the - current system time, down to the minute. For maximum - safety, you can apply a tag to your current - files.

      [root@localhost root]# su - nsadmin
      -[nsadmin@localhost aolserver]$ cd /web/openacs-dev
      -[nsadmin@localhost openacs-dev]$ cvs commit -m "last-minute commits before upgrade to 4.6"
      -cvs commit: Examining .
      -cvs commit: Examining bin
      -(many lines omitted)
      -[nsadmin@localhost openacs-dev]$ cvs tag before_upgrade_to_4_6
      -cvs server: Tagging bin
      -T bin/acs-4-0-publish.sh
      -T bin/ad-context-server.pl
      -(many lines omitted)
      -[nsadmin@localhost openacs-dev]$ exit
      -[root@localhost root]# 
      -
      su - nsadmin
      -cd /web/openacs-dev
      -cvs commit -m "last-minute commits before upgrade to 4.6"
      -cvs tag before_upgrade_to_4_6
      -exit
    • File tree without CVS.�If you don't use cvs, you may want to back up the working directory. The simplest way is just to copy it.

      [root@localhost root]# su - nsadmin
      -[nsadmin@localhost aolserver]$ cp -r /web/openacs-dev /web/openacs-dev-before-upgrade-to-4.6
      -[nsadmin@localhost aolserver]$ exit
      -[root@localhost root]# 
      -
      su - nsadmin
      -cp -r /web/openacs-dev /web/openacs-dev-before-upgrade-to-4.6
      -exit
  2. OPTIONAL: Upgrade OpenFTS.�OpenACS Full Text Search requires several pieces: the OpenFTS code, some database functions, and the OpenFTS Engine. If you have OpenFTS 0.2, you'll need to upgrade to to OpenFTS 0.3.2. This is backwards-compatible - + complete.

    Figure�7.1.�Assumptions in this section

    name of OpenACS usernsadmin
    OpenACS server nameopenacs-dev
    Root of OpenACS file tree/web/openacs-dev
    Database backup directory/backup/openacs/

Upgrading on Linux/Unix

  1. Make a Backup.�Back up the database and file system (see the section called “Snapshot backup and recovery”).

  2. OPTIONAL: Upgrade OpenFTS.�OpenACS Full Text Search requires several pieces: the OpenFTS code, some database functions, and the OpenFTS Engine. If you have OpenFTS 0.2, you'll need to upgrade to to OpenFTS 0.3.2. This is backwards-compatible - completing this step will not break a working OpenFTS Engine from 4.5.

    1. Uninstall the old OpenFTS Engine

      1. Browse to http://yourserver/openfts.

      2. Click Administration.

      3. Click Drop OpenFTS Engine

    2. Build and install the new OpenFTS driver and supporting tcl procedures. (This section of shell code is not fully documented; please exercise care.)

      cd /usr/local/src/
      @@ -96,7 +58,7 @@
       

      Import the new files into your cvs repository; where they match existing files, they will become the new version of the file.

      [nsadmin@localhost openacs-4.6]$  cvs import -m "upgrade to OpenACS 4.6" openacs 
       OpenACS openacs-4-6

      Create a new directory as temporary working space to reconcile conflicts between the new files and your current work. The example uses the cvs keyword yesterday, making the assumption that you haven't checked in new code to your local tree in the last day.

      [nsadmin@localhost openacs-4.6]$  cd /web
       [nsadmin@localhost tmp]$ mkdir openacs-upgrade
      -[nsadmin@localhost tmp]$ cvs checkout -d openacs-upgrade -jOpenACS:yesterday -jOpenACS openacs < cvs.txt 2<&1
      +[nsadmin@localhost tmp]$ cvs checkout -d openacs-upgrade -jOpenACS:yesterday -jOpenACS openacs > cvs.txt 2>&1
       (CVS feedback here)
       
      su - nsadmin
       cd /tmp
      @@ -105,7 +67,7 @@
       cvs import -m "upgrade to OpenACS 4.6" openacs OpenACS openacs-4-6
       cd /tmp
       mkdir openacs-upgrade
      -cvs checkout -d openacs-upgrade -jOpenACS:yesterday -jOpenACS openacs < cvs.txt 2<&1
      +cvs checkout -d openacs-upgrade -jOpenACS:yesterday -jOpenACS openacs > cvs.txt 2>&1
       
    3. The file /tmp/openacs-upgrade/cvs.txt contains the results of the upgrade. If you changed files that are part of the OpenACS tarball and those changes conflict with the 4.5-4.6 upgrade, you'll have to manually reconcile them. Use the emacs command M-x sort-lines and then, for each line that starts with a C, open that file and manually resolve the conflict by deleting the excess lines. When you're finished, or if there aren't any conflicts, save and exit.

    4. Once you've fixed any conflicts, commit the new code to your local tree.

      [nsadmin@localhost tmp]$ cd openacs-upgrade
       [nsadmin@localhost openacs-upgrade]$ cvs commit -m "Upgraded to 4.6"
      @@ -119,37 +81,11 @@
       [root@localhost root]#
       
      cd /web/openacs-dev
       cvs up -Pd
      -exit
  • Start the server.�

    [root@localhost root]# svc -u /service/openacs-dev
  • Use APM to upgrade the database.�

    1. Browse to the package manager, http://yourserver/acs-admin/apm.

    2. Click Install packages.

    3. Select the packages you want to install. This should be everything that says upgrade, plus any new packages you want.

    4. On the next screen, click Install Packages

    5. When prompted, restart the server:

      [root@localhost root]# restart-aolserver openacs-dev
    6. Wait a minute, then browse to the package manager, http://yourserver/acs-admin/apm.

    7. Check that the kernel upgrade worked by clicking All and making sure that acs-kernel version is 4.6.1.

  • OPTIONAL: Install the new OpenFTS Engine.�If you want to upgrade the OpenFTS Engine, do these steps. (You - must have already upgraded the OpenFTS driver to - 0.3.2.

    1. Browse to http://yourserver/admin/site-map

    2. On the openfts line, click on set parameters.

    3. Change the value of openfts_tcl_src_path from /usr/local/src/Search-OpenFTS-tcl-0.2/ to /usr/local/src/Search-OpenFTS-tcl-0.3.2/

    4. Click Set Parameters

    5. [root@localhost root]# restart-aolserver openacs-dev
    6. Browse to http://yourserver/openfts

    7. Click Administration.

    8. Click Initialize OpenFTS Engine

  • Rollback.�If anything goes wrong, roll back the database and try - again.

    [root@localhost root]# su - nsadmin
    -[nsadmin@localhost aolserver]$ svc -d /service/openacs-dev
    -[nsadmin@localhost aolserver]$ dropdb openacs-dev
    -DROP DATABASE
    -[nsadmin@localhost aolserver]$ createdb openacs-dev
    -CREATE DATABASE
    -[nsadmin@localhost aolserver]$ psql -f /web/openacs-dev/packages/acs-kernel/sql/postgresql/postgresql.sql openacs-dev

    PostGreSQL's dump command does not guarantee to back up all of the -procedures and things in the right order for them to be reassembled. -In practice, OpenACS users have found that rebuilding some of the -common procedures before running the restore usually addresses this. You will see a number of "already exists" errors when you run the database restore; these can be ignored. This <a>forum thread</a> has more information.

    [nsadmin@localhost aolserver]$ psql openacs-dev < /backup/openacs/openacs_dev_before_upgrade_to_4.6.dmp
    -[nsadmin@localhost aolserver]$ svc -u /service/openacs-dev
    -[nsadmin@localhost aolserver]$ exit

    At this point, you can try go back to the APM and try -to upgrade the database again. Alternately, if you want to roll back -all the way and stop the upgrade, you need to roll back the file -system as well.

    [root@localhost root]# su - nsadmin
    -[nsadmin@localhost aolserver]$ mv /web/openacs-dev /web/openacs-failed-upgrade
    -[nsadmin@localhost aolserver]$ mv /web/openacs-dev-before-upgrade-to-4.6 /web/openacs-dev
    -[nsadmin@localhost aolserver]$ svc -u /web/openacs-dev
    -[nsadmin@localhost aolserver]$ exit
    -[root@localhost root]#
    All commands for this section:
    -
    su - nsadmin
    -svc -d /service/openacs-dev
    -dropdb openacs-dev
    -createdb openacs-dev
    -psql -f /web/openacs-dev/packages/acs-kernel/sql/postgresql/postgresql.sql openacs-dev
    -psql openacs-dev < /backup/openacs/openacs_dev_before_upgrade_to_4.6.dmp
    -
    -svc -u /service/openacs-dev
    -cd /web/openacs-dev
    -cvs up -r current
    -exit
  • ($Id$)
    View comments on this page at openacs.org
    +exit
  • Start the server.�

    [root@localhost root]# svc -u /service/openacs-dev
  • Use APM to upgrade the database.�

    1. Browse to the package manager, http://yourserver/acs-admin/apm.

    2. Click Install packages.

    3. Select the packages you want to install. This should + be everything that says + upgrade, plus any new + packages you want. It's safest to upgrade the kernel by + itself, and then come back and upgrade the rest of the + desired packages in a second pass.

    4. On the next screen, click Install Packages

    5. When prompted, restart the server:

      [root@localhost root]# restart-aolserver openacs-dev
    6. Wait a minute, then browse to the package manager, http://yourserver/acs-admin/apm.

    7. Check that the kernel upgrade worked by clicking All and making sure that acs-kernel version is 5.0.0.

  • OPTIONAL: Install the new OpenFTS Engine.�If you want to upgrade the OpenFTS Engine, do these + steps. (You must have already upgraded the OpenFTS driver to + 0.3.2.)

    1. Browse to http://yourserver/admin/site-map

    2. On the openfts line, click on set parameters.

    3. Change the value of openfts_tcl_src_path from /usr/local/src/Search-OpenFTS-tcl-0.2/ to /usr/local/src/Search-OpenFTS-tcl-0.3.2/

    4. Click Set Parameters

    5. [root@localhost root]# restart-aolserver openacs-dev
    6. Browse to http://yourserver/openfts

    7. Click Administration.

    8. Click Initialize OpenFTS Engine

  • Rollback.�If anything goes wrong, roll back to the backup snapshot.

  • ($Id$)
    View comments on this page at openacs.org