Following the steps suggested by Florian; I managed to upgrade our OTRS Appliance (BlackBox) system from 4.0.8 to 6.0.10 Generic system.
First of all, you'll need to backup your original system........ Please follow the Guide provided:
http://doc.otrs.com/doc/manual/admin/4. ... store.html & move the following files to a network share or slaved HDD.
Code: Select all
root@HOSTNAME:~# ls /opt/backup/2018-08-07_15-37/
Application.tar.gz Config.tar.gz DatabaseBackup.sql.gz
Also make sure to note the encryption/authentications details found in Config.pm file "vi /opt/otrs/Kernel/Config.pm".
Code: Select all
# ---------------------------------------------------- #
# database settings #
# ---------------------------------------------------- #
# The database host
$Self->{DatabaseHost} = '127.0.0.1';
# The database name
$Self->{Database} = 'otrs';
# The database user
$Self->{DatabaseUser} = 'otrs';
# The password of database user. You also can use bin/otrs.CryptPassword.pl
# for crypted passwords
$Self->{DatabasePw} = 'PPPPPPPaaaaassssssswwwwwwooooorrrrddddd';
$Self->{SecureMode}=1;
$Self->{"Package::Timeout"}=120;
$Self->{'SystemID'}=49;
$Self->{'SessionName'}='OTRSAgentInterface';
### MARKER ###
Now build a new system, I've chosen Debian.
Code: Select all
root@HOSTNAME:~# cat /etc/*release
PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
Make sure to update/upgrade the system.
Code: Select all
root@HOSTNAME:~# apt update && apt upgrade
Now install the required Database software: Ours being Postgresql.
Code: Select all
root@HOSTNAME:~# apt install postgresql-9.6
Create a "Database User" called "otrs". To do so you will need to login to the "postgres" account. This account was built automatically when installing the postgresql software.
Now assign a password to this account.
Code: Select all
postgres@HOSTNAME:~$ passwd postgres
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Now that you've moved into the postgres account, here is were you create the "Database user" called "otrs". Make sure to answer "no" to "Superuser, Create Database & Create more new roles".
Code: Select all
postgres@HOSTNAME:~$ createuser --interactive otrs
Shall the new role be a superuser? (y/n) n
Shall the new role be allowed to create databases? (y/n) n
Shall the new role be allowed to create more new roles? (y/n) n
Next you'll need to set a password for the "Database User" - "otrs". This password will be the password noted in the "Config.pm" file above.
Type the following to access the postgresql console.
Code: Select all
postgres@HOSTNAME:~$ psql
Password:
psql (9.6.10)
Type "help" for help.
postgres=#
Display the "Database Users" with the following command. As you can see in the below list you will find the "otrs" user you created earlier.
Code: Select all
postgres=# \du
List of roles
Role name | Attributes | Member of
-----------+------------------------------------------------------------+-----------
otrs | | {}
postgres | Superuser, Create role, Create DB, Replication, Bypass RLS | {}
postgres=#
Set the password for the "otrs" user by typing the following. Now use the password from the Config.pm file.
Code: Select all
postgres=# \password otrs
Enter new password:
Enter it again:
postgres=#
Now we've completed the pre-build for our database import, we can move on to OTRS install itself.
Exit out of the "postgres" account.
Code: Select all
postgres@HOSTNAME:~$ su - root
Password:
root@otrsdev:~#
Install OTRS 6.0.10 & all prerequisites
http://doc.otrs.com/doc/manual/admin/st ... -on-debian.
On the following "Step 7: File Permissions" make sure to use the below code or you'll run into permission issues with Apache.
Code: Select all
bin/otrs.SetPermissions.pl --web-group=www-data
Step 8: Database Setup and Basic System Configuration. Make sure you can browse to the following link within step 8, however do not configure the system via the installer link.
If this is successful, you should be good to go with the below steps.
Stop The following processes.
Code: Select all
root@HOSTNAME:~# service cron stop && service apache2 stop && service postgresql stop
Now change the directory to something like "otrs<version>".
Code: Select all
root@HOSTNAME:~# mv /opt/otrs /opt/otrs6010
Make a new directory in /opts/ called "otrs".
Then create a symlink between the two folders.
Code: Select all
root@HOSTNAME:~# ln -s /opt/otrs6010/* /opt/otrs/
The result should look like the following.
Code: Select all
root@HOSTNAME:~# ls -al otrs
total 8
drwxr-xr-x 2 root root 4096 Sep 3 15:35 .
drwxr-xr-x 5 root root 4096 Sep 3 15:35 ..
lrwxrwxrwx 1 root root 21 Sep 3 15:35 ARCHIVE -> /opt/otrs6010/ARCHIVE
lrwxrwxrwx 1 root root 24 Sep 3 15:35 AUTHORS.md -> /opt/otrs6010/AUTHORS.md
lrwxrwxrwx 1 root root 17 Sep 3 15:35 bin -> /opt/otrs6010/bin
lrwxrwxrwx 1 root root 24 Sep 3 15:35 CHANGES.md -> /opt/otrs6010/CHANGES.md
lrwxrwxrwx 1 root root 29 Sep 3 15:35 CONTRIBUTING.md -> /opt/otrs6010/CONTRIBUTING.md
lrwxrwxrwx 1 root root 21 Sep 3 15:35 COPYING -> /opt/otrs6010/COPYING
lrwxrwxrwx 1 root root 33 Sep 3 15:35 COPYING-Third-Party -> /opt/otrs6010/COPYING-Third-Party
lrwxrwxrwx 1 root root 20 Sep 3 15:35 Custom -> /opt/otrs6010/Custom
lrwxrwxrwx 1 root root 17 Sep 3 15:35 doc -> /opt/otrs6010/doc
lrwxrwxrwx 1 root root 18 Sep 3 15:35 i18n -> /opt/otrs6010/i18n
lrwxrwxrwx 1 root root 24 Sep 3 15:35 INSTALL.md -> /opt/otrs6010/INSTALL.md
lrwxrwxrwx 1 root root 20 Sep 3 15:35 Kernel -> /opt/otrs6010/Kernel
lrwxrwxrwx 1 root root 23 Sep 3 15:35 README.md -> /opt/otrs6010/README.md
lrwxrwxrwx 1 root root 21 Sep 3 15:35 RELEASE -> /opt/otrs6010/RELEASE
lrwxrwxrwx 1 root root 21 Sep 3 15:35 scripts -> /opt/otrs6010/scripts
lrwxrwxrwx 1 root root 25 Sep 3 15:35 UPDATING.md -> /opt/otrs6010/UPDATING.md
lrwxrwxrwx 1 root root 17 Sep 3 15:35 var -> /opt/otrs6010/var
Now start the following services.
Code: Select all
root@HOSTNAME:~# service cron start && service apache2 start && service postgresql start
Test the following link once again
http://localhost/otrs/installer.pl to make sure the system is still working.
Now stop the following services & repeat the process with OTRS 5.0.0 & OTRS 4.0.8.
Code: Select all
root@HOSTNAME:~# service cron stop && service apache2 stop && service postgresql stop
Now delete delete the symlink.
Start with the next installation guide;
http://doc.otrs.com/doc/manual/admin/5. ... -on-debian, once you've completed that install move to the next;
http://doc.otrs.com/doc/manual/admin/4. ... -on-debian
Once you've install OTRS 5.0.0 & 4.0.0 and managed to get all 3 working via the symlink setup shown above. The "/opt/" directory should look something like this.
Code: Select all
root@HOSTNAME:~# ls -al /opt/
total 28
drwxr-xr-x 7 root root 4096 Sep 4 13:34 .
drwxr-xr-x 22 root root 4096 Aug 17 15:31 ..
drwxr-xr-x 3 root root 4096 Sep 3 13:55 backup
drwxr-xr-x 2 root root 4096 Sep 3 15:35 otrs
drwxr-xr-x 2 otrs www-data 4096 Sep 4 13:34 otrs408
drwxr-xr-x 2 otrs www-data 4096 Sep 4 13:34 otrs500
drwxr-xr-x 9 otrs www-data 4096 Jul 24 16:47 otrs6010
Copy the backup you did at the beginning of this process into the following folder "/opt/backup/" if this folder does not exist, create it. My backup being - folder "2018-08-07_15-37".
Now follow the Restore process found here;
http://doc.otrs.com/doc/manual/admin/4. ... store.html
When performing the Restore Process, make sure there is no symlink, I ran into problems for some reason.......
Change the "otrs408" folder to "otrs" & do the restore, then change it back to "otrs408", with a symlink attached to "otrs".
This will inject the backup database into the postgresql system under the database name "otrs". You can check this by running the following command in psql.
Code: Select all
postgres@HOSTNAME:~$ psql
Password:
psql (9.6.10)
Type "help" for help.
postgres=# \list
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
-----------+----------+----------+-------------+-------------+-----------------------
otrs | otrs | UTF8 | en_GB.UTF-8 | en_GB.UTF-8 |
postgres | postgres | UTF8 | en_GB.UTF-8 | en_GB.UTF-8 |
template0| postgres | UTF8 | en_GB.UTF-8 | en_GB.UTF-8 | =c/postgres +
| | | | | postgres=CTc/postgres
template1| postgres | UTF8 | en_GB.UTF-8 | en_GB.UTF-8 | =c/postgres +
| | | | | postgres=CTc/postgres
(4 rows)
postgres=#
Make sure the "otrs" user is also the OWNER of the "otrs" database. If this is not the case, do the following.
Code: Select all
postgres=# ALTER DATABASE otrs OWNER TO otrs;
ALTER DATABASE
postgres=#
The restore process will also pull over all the required config files to the new system.
Now start the following services.
Code: Select all
root@HOSTNAME:~# service cron start && service apache2 start && service postgresql start
And use the following link http://<hostname>/otrs/index.pl
This should now access your old installation & database on a new system, using your admin credentials from the old system.
Lastly, following these steps to upgrade the otrs version from 4 to 5.
https://doc.otrs.com/doc/manual/admin/5 ... ading.html
And from OTRS 5 to 6.
https://doc.otrs.com/doc/manual/admin/6 ... ating.html
I've had to write most of this from memory, so there may be mistakes in this process, however the methodology worked a treat and I've managed to get our OTRS Appliance 4.0.8 (Blackbox) upgraded to OTRS 6.0.10 Generic.
@Florian you were right, that was one hell of a long process & upgrade..... Glad it's all done now

. Again thanks for the help!
Kind Regards,
Richard