## 3.16. Upgrading from 5.0.x to 5.1.x

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/olat5.1.x and install the 5.1.x 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 olat (if olat is a symlink, otherwise: mv olat3 olat4.1.4)
    #unzip OLAT-5.1.0.zip
    #ln -s OLAT-5.1.0-FINAL-XXXXX olat
    #cd olat
    #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_5_0_0_to_5_1_0.sql

Now start tomcat.

### 3.16.1. Conversion of wiki's

In OLAT 5.1.0 we introduced a new wiki syntax (mediawiki) to html parser with much more syntax support. To make sure all your wiki's look the same we have to make some conversions. To start the conversion do the following:

    $ cd  PATH_TO_YOUR_OLAT/bin/wiki_migration
    ## edit the wiki_migration_51.sh to your path of repoistory and olat installation
    $ vi wiki_migration_51.sh
    ## change export BCROOT=/usr/local/opt/olat/olatdata/bcroot to your installation
    ## change export OLATROOT=/usr/local/opt/olat/olatlive to your installation
    ## run it!
    $ ./wiki_migration_51.sh
    ## in the output.log you will see what changed