OTRS 3.0.2 - 3.0.x upgrade information

Dont create your support topics here! No new topics with questions allowed!

Moderator: crythias

Forum rules
Dont create your support topics here! No new topics with questions allowed!
Post Reply
Andre Bauer
Znuny guru
Posts: 2189
Joined: 08 Dec 2005, 17:01
Znuny Version: 5.0.x
Real Name: André Bauer
Company: Magix Software GmbH
Location: Dresden
Contact:

OTRS 3.0.2 - 3.0.x upgrade information

Post by Andre Bauer »

[Mod note: This originally was a thread on downloading a vdi. It's way past irrelevant, unavailable, and deleted. The concepts provided by Andre may still be useful. "Overwriting" means extracting the source of a new release over the existing version. Please back up your folder structure and database before any upgrade attempt.
-- crythias 7/20/12]

After overwriting you should also run the set permissions script and clean the cash.

If you want to run the latest cvs version for your test, you can also use the following bash script.

The config of the scripts fits allready for Ubuntu. You only need to edit your home dir.

When exiting the script, it fetches the newest version of OTRS from CVS, includes the current otrs config, sets the permissisions, rebuilds the otrs config, cleans the cache and finally reloads the webserver.

Before exiting you need to run the following command:

Code: Select all

cvs -d :pserver:anonymous@cvs.otrs.org:/home/cvs login 
the password is: cvs

Code: Select all

#!/bin/bash

#config
OTRS_TMP_DIR="/home/yourname"
OTRS_DIR="/opt"
OTRS_NAME="otrs"
OTRS_USER="otrs"
OTRS_GROUP="otrs"
WEBSERVER_USER="www-data"
WEBSERVER_GROUP="www-data"
ERROR_COUNT="0"

# functions
function actionstart (){
    echo -e "\n`date '+%d.%m.%G %H:%M:%S'` - ${1}"
}

function exitcode (){
    if [ "$?" = 0 ];then
        echo "`date '+%d.%m.%G %H:%M:%S'` - ${1} - ok "
    else
        echo "`date '+%d.%m.%G %H:%M:%S'` - ${1} - not ok "
        let ERROR_COUNT=ERROR_COUNT+1
    fi
}

#script

actionstart "open otrs tmp dir"
cd ${OTRS_TMP_DIR}
exitcode "open otrs tmp dir"

actionstart "delete odl otrs tmp dir if exists"
test -d ${OTRS_TMP_DIR}/${OTRS_NAME}/ && rm -r ${OTRS_TMP_DIR}/${OTRS_NAME}/
exitcode "delete odl otrs tmp dir if exists"

actionstart "checkout otrs head from cvs"
cvs -z3 -d :pserver:anonymous@cvs.otrs.org:/home/cvs co otrs
exitcode "checkout otrs head from cvs"

actionstart "copy old Config.pm to new cvs version tmp dir"
cp ${OTRS_DIR}/${OTRS_NAME}/Kernel/Config.pm ${OTRS_TMP_DIR}/${OTRS_NAME}/Kernel/
exitcode "copy old Config.pm to new cvs version tmp dir"

actionstart "copy old ZZZAuto.pm to new cvs version tmp dir"
cp ${OTRS_DIR}/${OTRS_NAME}/Kernel/Config/Files/ZZZAuto.pm ${OTRS_TMP_DIR}/${OTRS_NAME}/Kernel/Config/Files/
exitcode "copy old ZZZAuto.pm to new cvs version tmp dir"

actionstart "copy old ZZZAAuto.pm to new cvs version tmp dir"
cp ${OTRS_DIR}/${OTRS_NAME}/Kernel/Config/Files/ZZZAAuto.pm ${OTRS_TMP_DIR}/${OTRS_NAME}/Kernel/Config/Files/
exitcode "copy old ZZZAAuto.pm to new cvs version tmp dir"

actionstart "remove old otrs dir"
rm -r ${OTRS_DIR}/${OTRS_NAME}
exitcode "remove old otrs dir"

actionstart "move new cvs version to otrs location"
mv ${OTRS_TMP_DIR}/${OTRS_NAME}/ ${OTRS_DIR}/
exitcode "move new cvs version to otrs location"

actionstart "set otrs permissions"
${OTRS_DIR}/${OTRS_NAME}/bin/otrs.SetPermissions.pl --otrs-user=${OTRS_USER} --otrs-group=${OTRS_GROUP} --web-user=${WEBSERVER_USER} --web-group=${WEBSERVER_GROUP} ${OTRS_DIR}/${OTRS_NAME}
exitcode "set otrs permissions"

actionstart "rebuild otrs config"
${OTRS_DIR}/${OTRS_NAME}/bin/otrs.RebuildConfig.pl
exitcode "rebuild otrs config"

actionstart "delete otrs cache"
${OTRS_DIR}/${OTRS_NAME}/bin/otrs.LoaderCache.pl -o delete
exitcode "delete otrs cache"

actionstart "reload webserver"
/etc/init.d/apache2 reload
exitcode "reload webserver"

echo -e "\nGet OTRS from CVS finished! Errors = ${ERROR_COUNT}\n
Prod: Ubuntu Server 16.04 / Zammad 1.2

DO NOT PM ME WITH OTRS RELATED QUESTIONS! ASK IN THE FORUMS!

OtterHub.org
Post Reply