9.9. Upgrading the 3.x.y series

Upgrading from 3.2.1 to 4.0.0

Install OLAT as described in the installation chapter but DON'T RUN 'ant dbsetup'!! We recommend to move your existing installation from PATH_TO_YOUR_OLAT/olat3 to PATH_TO_YOUR_OLAT/olat3.2.1 and install the 4.0.0 package as your new PATH_TO_YOUR_OLAT/olat3. All user data is located in the olatdata directory which should not be located in the PATH_TO_YOUR_OLAT/olat3. The olatdata directory and the database won't be changed when installing the new code.

#cd PATH_TO_YOUR_OLAT
#rm olat3 (if olat3 is a symlink, otherwise: mv olat3 olat3.2.1)
#unzip OLAT-4.0.0.zip
#ln -s OLAT-4.0.0-FINAL-XXXXX olat3
#cd olat3
#cp build.properties.default build.properties
#vi build.properties
#ant config-all
#ant install

Update your database manually according to PATH_TO_YOUR_OLAT/olat3/database/alter_3_2_1_to_4_0_0.sql

Now start tomcat. The first launch might take some time if you have a big userbase and a lot of groups because the efficiency statements for each user get calculated. The efficiency statement calulation runs only once.

Upgrading from 3.2.0 to 3.2.1

3.2.1 is a minor bugfix release. There are no database changes, it is only a code replacement for the 3.2.0 release, the installation should be easy. We compiled this distribution using a Java 1.5 compiler (but on 1.4 source level).A compiler bug in the 1.4 compiler could produce null pointers without stacktraces in the logfile which made this change necessary.

Install OLAT as described in the installation chapter but DON'T RUN 'ant dbsetup'!! We recommend to move your existing installation from PATH_TO_YOUR_OLAT/olat3 to PATH_TO_YOUR_OLAT/olat3.2.0 and install the 3.2.1. package as your new PATH_TO_YOUR_OLAT/olat3. All user data is located in the olatdata directory which should not be located in the PATH_TO_YOUR_OLAT/olat3. The olatdata directory and the database won't be changed when installing the new code.

#cd PATH_TO_YOUR_OLAT
#rm olat3 (if olat3 is a symlink, otherwise: mv olat3 olat3.2.0)
#unzip OLAT-3.2.1.zip
#ln -s OLAT-3.2.1-FINAL-XXXXX olat3
#cd olat3
#cp build.properties.default build.properties
#vi build.properties
#ant config-all
#ant install

Now start tomcat.

Upgrading from 3.1.4 to 3.2.0

One of the major topics of the 3.2 release is full UTF-8 support, therefore it's necessary while upgrading from 3.1.4 to 3.2.0 to convert all courses and the dump of the database. Likewise there are added some files to the ContentPackages, so that they are offline readable.

Conversion of the existing Filesystem

To convert the existing filesystem you need to start a shell and run the main method of the java class "Convert314To32" with several parameters and the -Djava.ext.dirs option.

cd OLAT_HOME/webapp/WEB-INF/classes

java -Djava.ext.dirs=../lib org.olat.migration.Convert314To32 \
OLAT_HOME/webapp/static/cp_offline_menu_mat \
OLAT_DATA/bcroot/repository \
OLAT_DATA/bcroot/course

In order to make it clear below an example with OLAT_HOME=/usr/local/opt/olat/olatlive and OLAT_DATA=/usr/local/opt/olat/olatdata

cd /usr/local/opt/olat/olatlive/webapp/WEB-INF/classes

java -Djava.ext.dirs=../lib org.olat.migration.Convert314To32 \
/usr/local/opt/olat/olatlive/webapp/static/cp_offline_menu_mat \
/usr/local/opt/olat/olatdata/bcroot/repository \
/usr/local/opt/olat/olatdata/bcroot/course
'/usr/local/opt/olat/olatlive/webapp/static/cp_offline_menu_mat'
'/usr/local/opt/olat/olatdata/bcroot/repository'
'/usr/local/opt/olat/olatdata/bcroot/course'

is this ok (type 'yes')
yes
Adding offline files to content packaging
> >> >>>
imsmanifest.xml found in:
/usr/local/opt/olat/olatdata/bcroot/repository/70997909950872/_unzipped_
zip-file found in: /usr/local/opt/olat/olatdata/bcroot/repository/70997909950872/cp-demo.zip
...
...
...
Adding header to internal course xml files
converting /usr/local/opt/olat/olatdata/bcroot/course/70997909950887/editortreemodel.xml
converting /usr/local/opt/olat/olatdata/bcroot/course/70997909950887/runstructure.xml
...
... 
...

Converting and Altering of the database

  1. Dump the olat database after you stopped the tomcat server.

    mysqldump -u [olat_db_user] -p olat > olat.sql
  2. Insert the lines below at the begin of the dump olat.sql

    CREATE DATABASE olat;
    USE olat; SET AUTOCOMMIT=0;
    SET FOREIGN_KEY_CHECKS=0;

    and at the end of olat.sql:

    COMMIT;
  3. Start the conversion from iso-8859-1 to utf8 using iconv.

    iconv -f iso-8859-1 -t utf8 olat.sql > olat-iconv.sql
  4. Drop the olat database and insert the converted dump.

    mysql -u [olat_db_user] -p < olat-iconv.sql
  5. And finally execute the sql-statements in alter_3_1_4_to_3_2_0.sql.

    mysql -u [olat_db_user] -p < OLAT_HOME/database/alter_3_1_4_to_3_2_0.sql

Upgrading from 3.1.3 to 3.1.4

Install OLAT as described in the installation chapter but DON'T RUN 'ant dbsetup'!! We recommend to move your existing installation from PATH_TO_YOUR_OLAT/olat3 to PATH_TO_YOUR_OLAT/olat3.1.3 and install the 3.1.4 package as your new PATH_TO_YOUR_OLAT/olat3. All user data is located in the olatdata directory which should not be located in the PATH_TO_YOUR_OLAT/olat3. The olatdata directory and the database won't be changed when installing the new code.

#cd PATH_TO_YOUR_OLAT
#rm olat3 (if olat3 is a symlink, otherwise: mv olat3 olat3.1.3)
#unzip OLAT-3.1.4.zip
#ln -s OLAT-3.1.4-FINAL-XXXXX olat3
#cd olat3
#cp build.properties.default build.properties
#vi build.properties
#ant config-all
#ant install

Update your database manually according to PATH_TO_YOUR_OLAT/olat3/database/alter_3_1_3_to_3_1_4.sql

Now start tomcat. The first launch might take some time.

Upgrading from 3.1.2 to 3.1.3

Install OLAT as described in the installation chapter but DON'T RUN 'ant dbsetup'!! We recommend to move your existing installation from PATH_TO_YOUR_OLAT/olat3 to PATH_TO_YOUR_OLAT/olat3.1.2 and install the 3.1.3 package as your new PATH_TO_YOUR_OLAT/olat3. All user data is located in the olatdata directory which should not be located in the PATH_TO_YOUR_OLAT/olat3. The olatdata directory and the database won't be changed when installing the new code.

#cd PATH_TO_YOUR_OLAT
#rm olat3 (if olat3 is a symlink, otherwise: mv olat3 olat3.1.2)
#unzip OLAT-3.1.3.zip
#ln -s OLAT-3.1.3-FINAL-XXXXX olat3
#cd olat3
#vi build.properties
#ant config-all
#ant install

Update your database manually according to PATH_TO_YOUR_OLAT/olat3/database/alter_3_1_2_to_3_1_3.sql

Now start tomcat. The first launch might take some time.

Upgrading from 3.1.0 to 3.1.2

Install OLAT as described in the installation chapter but DON'T RUN 'ant dbsetup'!! We recommend to move your existing installation from PATH_TO_YOUR_OLAT/olat3 to PATH_TO_YOUR_OLAT/olat3.1.0 and install the 3.1 package as your new PATH_TO_YOUR_OLAT/olat3. All user data is located in the olatdata directory which should not be located in the PATH_TO_YOUR_OLAT/olat3. The olatdata directory and the database won't be changed when installing the new code.

#cd PATH_TO_YOUR_OLAT
#rm olat3 (if olat3 is a symlink, otherwise: mv olat3 olat3.1.0)
#unzip OLAT-3.1.2.zip
#ln -s OLAT-3.1.2-FINAL-XXXXX olat3
#cd olat3
#vi build.properties
#ant config-all
#ant install

Update your database manually according to PATH_TO_YOUR_OLAT/olat3/database/alter_3_1_0_to_3_1_1.sql (there are no updates from 3.1.1 to 3.1.2, the 3.1.1 was never made public)

Now start tomcat. The first launch might take some time.

Upgrading from 3.0.1 to 3.1

Install OLAT as described in the installation chapter but DON'T RUN 'ant dbsetup'!! We recommend to move your existing installation from PATH_TO_YOUR_OLAT/olat3 to PATH_TO_YOUR_OLAT/olat3.0.0 and install the 3.1 package as your new PATH_TO_YOUR_OLAT/olat3. All user data is located in the olatdata directory which should not be located in the PATH_TO_YOUR_OLAT/olat3. The olatdata directory and the database won't be changed when installing the new code.

#cd PATH_TO_YOUR_OLAT
#rm olat3 (if olat3 is a symlink, otherwise: mv olat3 olat3.0.1)
#unzip OLAT-3.1.zip
#ln -s OLAT-3.1-FINAL-XXXXX olat3
#cd olat3
#vi build.properties
#ant config-all
#ant install

Update your database manually according to PATH_TO_YOUR_OLAT/olat3/database/alter_3_0_1_to_3_1_0.sql

Now start tomcat. The first launch might take some time.

Upgrading from 3.0.0 to 3.0.1

Install OLAT as described in the installation chapter but DON'T RUN 'ant dbsetup'!! We recommend to move your existing installation from PATH_TO_YOUR_OLAT/olat3 to PATH_TO_YOUR_OLAT/olat3.0.0 and install the 3.0.1 package as your new PATH_TO_YOUR_OLAT/olat3. All user data is located in the olatdata directory which should not be located in the PATH_TO_YOUR_OLAT/olat3. The olatdata directory and the database won't be changed when installing the new code. Example linux shell commands:

#cd PATH_TO_YOUR_OLAT
#rm olat3 (if olat3 is a symlink, otherwise: mv olat3 olat3.0.0)
#unzip OLAT-3.0.1.zip
#ln -s OLAT-3.0.1-FINAL-20040804 olat3
#cd olat3
#vi build.properties
#ant config-all
#ant install

Update your database manually according to PATH_TO_YOUR_OLAT/olat3/database/alter_3_0_0_to_3_0_1.sql

Now start tomcat. The first launch might take some time.