Recommendation for upgrading OTRS 3.1.2 (Debian6)

Moderator: crythias

Locked
synced21
Znuny newbie
Posts: 2
Joined: 04 Dec 2019, 14:13
Znuny Version: 3.2
Real Name: Rosch Abdolaziz
Company: sidion

Recommendation for upgrading OTRS 3.1.2 (Debian6)

Post by synced21 »

Hi everyone,


We have currently OTRS 3.1.2 installed on Debian 6.
Anyone knows what’s the best way to do the upgrade?
I know that I can jump directly to the newest version.

What I´m currently trying:
Fresh install of Debian 10. Copy old OTRS /opt/otrs/ to the new Debian 10.
With this scenario I´m running into a few problems with the perl modules.
Some modules are installed by using “"perl -MCPAN -e shell;"” the other modules are installed with “apt-get…”.
All required modules are installed. The script “checkModules.pl” still deliveries that they are missing.
Trying to install it again with “perl -MCPAN -e shell” delivers me that they are installed.
Can I try now to the the “scripts/DBUpdate-to-3.2.pl“. I mean an Apache2 configuration should not be required for a DBUpdate.

Below the output of otrs.CheckModules.pl.

Thanks a lot for any help!

o CGI..............................ok (v3.59)
o Crypt::PasswdMD5.................ok (v1.3)
o CSS::Minifier....................ok (v0.01)
o Date::Format.....................ok (v2.24)
o Date::Pcalc......................ok (v1.2)
o DBI..............................ok (v1.642)
o DBD::mysql.......................ok (v4.050)
o DBD::ODBC........................Not installed! (Optional - Required to connect to a MS-SQL database.)
o DBD::Oracle......................Not installed! (Optional - Required to connect to a Oracle database.)
o DBD::Pg..........................Not installed! (Optional - Required to connect to a PostgreSQL database.)
o Digest::MD5......................ok (v2.55)
o Digest::SHA::PurePerl............ok (v5.70)
o Encode::HanExtra.................ok (v0.23)
o Encode::Locale...................ok (v1.02)
o GD...............................ok (v2.71)
o GD::Text......................ok (v0.86)
o GD::Graph.....................ok (v1.54)
o GD::Graph::lines..............ok (v1.15)
o GD::Text::Align...............ok (v1.18)
o IO::Scalar.......................ok (v2.110)
o IO::Wrap.........................ok (v2.110)
o JavaScript::Minifier.............ok (v1.05)
o JSON.............................ok (v2.53)
Possible precedence issue with control flow operator at /opt/otrs/Kernel/cpan-lib/JSON/PP.pm line 1567.
o JSON::PP......................ok (v2.27200)
o JSON::XS......................ok (v4.02)
o Locale::Codes....................ok (v3.18)
o LWP::UserAgent...................Not installed! (Required - use "perl -MCPAN -e shell;" - )
o Mail::Internet...................ok (v2.08)
o Mail::POP3Client.................ok (v2.18 )
o IO::Socket::SSL...............ok (v2.060)
o Mail::IMAPClient.................ok (v3.42)
o IO::Socket::SSL...............ok (v2.060)
o MIME::Base64.....................ok (v3.15)
o MIME::Tools......................ok (v5.428)
o ModPerl::Util....................ok (v2.000010)
o Apache::DBI...................ok (v1.11)
o Apache2::Reload...............ok (v0.11)
o Net::DNS.........................ok (v1.21)
o Net::POP3........................ok (v3.11)
Useless use of \E at /opt/otrs/Kernel/cpan-lib/Net/IMAP/Simple.pm line 629.
Useless use of \E at /opt/otrs/Kernel/cpan-lib/Net/IMAP/Simple.pm line 632.
o Net::IMAP::Simple................ok (v1.20271)
o Net::IMAP::Simple::SSL........ok (v1.3)
o Net::SMTP........................ok (v3.11)
o Authen::SASL..................ok (v2.15)
o Net::SMTP::SSL................Not installed! (Optional - Required for SSL/SMTPS connections.)
o Net::SMTP::TLS::ButMaintained.ok (v0.18)
o Net::LDAP........................ok (v0.65)
o PDF::API2........................ok (v2.033)
o Compress::Zlib................ok (v2.074)
o SOAP::Lite.......................Not installed! (Optional - Required for the SOAP interface.)
o version.......................ok (v0.9923)
o Class::Inspector..............Not installed! (Optional - Required for SOAP::Lite.)
o Text::CSV........................ok (v1.21)
o Text::CSV_PP..................ok (v1.29)
o Text::CSV_XS..................Not installed! (Optional - Install it for faster CSV handling.)
o XML::Parser......................ok (v2.44)
o HTTP::Message....................Not installed! (Required - use "perl -MCPAN -e shell;" - Required for HTTP communication.)
o HTTP::Headers.................ok (v6.00)
o URI..............................Not installed! (Required - use "perl -MCPAN -e shell;" - Handles encoding and decoding of URLs)
o URI::Escape...................Not installed! (Required - use "perl -MCPAN -e shell;" - Handles encoding and decoding of URLs.)
o Scalar::Util.....................ok (v1.5)
wurzel
Znuny guru
Posts: 3273
Joined: 08 Jul 2010, 22:25
Znuny Version: x.x.x
Real Name: Florian

Re: Recommendation for upgrading OTRS 3.1.2 (Debian6)

Post by wurzel »

Hi,

first of all you can NOT directly upgrade to 6. You have to update to
3.2 then to 3.3, then to 4.x then to 5.x then to 6.x

you should start reading https://github.com/OTRS/otrs/blob/rel-3_2/UPGRADING.md

unfortunatly I do not find otrs4 upgrading docs any longer. In summary it is the same.

I usually set up a new Debian 10 and try to get otrs 6 running. If support assessement shows all OK
i move the /opt/otrs directory to /opt/otrs-6 and try to set up a 5
then a version 4 and so on until all versions are fine and without errors. This keeps me from having basic issues

Then I do the upgrade to 3.2. 3.3. and so on.

I always (!) use tar.gz files
I never use debian repos

You should be fine doing so

If latest debian 10 does not support otrs 3.x
you have to use deb9 or previous for updating your system.
(you should not have waiting this long for the update) ;-)

regards
Flo
OTRS 2025 SILVER (Prod)
OTRS 2025 auf Debian 12 (Test)
Znuny 7.x latest version testing auf Debian 12

-- Ich beantworte keine Forums-Fragen PN - No PN please

I won't answer to unfriendly users any more. A greeting and regards are just polite.
synced21
Znuny newbie
Posts: 2
Joined: 04 Dec 2019, 14:13
Znuny Version: 3.2
Real Name: Rosch Abdolaziz
Company: sidion

Re: Recommendation for upgrading OTRS 3.1.2 (Debian6)

Post by synced21 »

Hi,

thanks for your reply.

I don´t understand one part:

So you’re installing on a Debian 10 otrs 6. Than you move the old otrs which would be in my case otrs 3.1. to otrs6 ? Than installing 5 then 4…

you have in opt/otrs4 - /opt/otrs5 – opt/otrs6 and /opt/otrs3. Or are you overwriting the old files with the new otrs 6 files and replace them every time until you reach otrs 3?
Can you bit more specific?

What happens with all the pearl dependencies if you have all the different version installed.
That’s the main problem I currently have because I installed most pearl modules via debain apt source.
And Debian is installing the newest one of course which are not compatible with otrs3.1.

I will try now to install the exact same pearl which are used by the otrs3.1(debian6) on the debian 10 server.

best regards!
zzz
Znuny superhero
Posts: 914
Joined: 15 Dec 2016, 15:13
Znuny Version: All
Real Name: Emin
Company: Efflux GmbH
Contact:

Re: Recommendation for upgrading OTRS 3.1.2 (Debian6)

Post by zzz »

Hello Rosch,

There are multiple ways:

The way I recommend you:
Fully backup your server. Update OTRS to the latest possible version on your OS and migrate it to the new server.
Install all needed Perl modules (don't update the Perl version; the one coming with Debian 10 is high enough) via the package manager (some need to be installed via CPAN) and continue the update steps to the latest version.

The way we do it:
Migrate the current OTRS to the new server and update to the newest version.
There are a few files that need to replaced to get sure that the old OTRS versions (at least if it's not ancient) run on newer Perl versions.
That increases the efficiency but is not be necessary if you have to update OTRS from 3.x once in a lifetime.

I also only install from source (tar) and go the normale way: 3.1->3.2->3.3->4->5->6.
Don't overwrite old files. Copy them to the next OTRS version, like shown in the docs.

Best regards
Emin
Professional Znuny and OTRS services: efflux.de | efflux.de/en/

Free and premium add-ons: German | English
nickb
Znuny newbie
Posts: 7
Joined: 12 Jan 2017, 00:40
Znuny Version: 3.3.11
Real Name: Nick Bright
Company: Valnet

Re: Recommendation for upgrading OTRS 3.1.2 (Debian6)

Post by nickb »

I recently did exactly this, perhaps three weeks ago, though I am using CentOS.

I started with CentOS 6 on OTRS 3.3.12.

First upgrade from 3.1.2 to 3.3.12, as the documentation does reference that you must be on 3.3 to upgrade to v4. https://ftp.otrs.org/pub/otrs/doc/doc-a ... n_book.pdf

What I did was cloned my OTRS VM to dev and did the process several times. If you're in a VM environment, I'd suggest some practice runs to find out all the possible problems.

Here is a summary of the my notes from the process

1) Backup. Did you back up? Back up again.
2) Make sure you backed up.
3) Upgrade OTRS 3 to OTRS 4

Follow procedure in otrs_admin_book 4.pdf page 38 (https://ftp.otrs.org/pub/otrs/doc/doc-a ... n_book.pdf)

DO NOT Uninstall & reinstall packages like FAQ - data loss will occur. To upgrade packages su to otrs user, then:
• bin/otrs.PackageManager.pl -a upgrade -p http://ftp.otrs.org/pub/otrs/packages/:FAQ-4.0.12.opm
• bin/otrs.PackageManager.pl -a upgrade -p http://ftp.otrs.org/pub/otrs/packages/:Survey-4.0.7.opm

Rename "/opt/otrs/Custom/" to "/opt/otrs/Custom.disabled"

I didn't restart any services at this point, which is the final step of the upgrade; except apache. The web interface should successfully load.

4) Upgrade from OTRS 4 to OTRS 5

Follow upgrade procedure at https://doc.otrs.com/doc/manual/admin/5 ... ading.html

Procedure Notes:
Before running the DB migration, Make sure to migrate tables with bin/otrs.Console.pl Maint::Database::MySQL::InnoDBMigration this process will take quite a while.
At Step 8 don’t restart services, upgrade packages again with package manager. Note command changes to otrs.Console.pl e.g. bin/otrs.Console.pl Admin::Package::List run as otrs user
DO NOT UNINSTALL & REINSTALL PACKAGES – DATA LOSS WILL OCCUR
• bin/otrs.Console.pl Admin::Package::Upgrade http://ftp.otrs.org/pub/otrs/packages/:FAQ-5.0.24.opm
• bin/otrs.Console.pl Admin::Package::Upgrade http://ftp.otrs.org/pub/otrs/packages/: ... 5.0.15.opm

5) Migrate from Centos6 to CentOS7

I am not sure how this applies to you on Debian. I had to do this because I'm using the RPM packages, and the package for OTRS 6 is not available for CentOS 6.

I did this migration by installing OTRS 5 on the CentOS 7 server, then copying all of my files from /opt/otrs/ from the CentOS 6 to CentOS 7 server, along with doing a database dump -> restore.

Some notes: Make sure to set the recommended mysql options for max_allowed_packet and query_cache_size. Run bin/otrs.Console.pl Maint::Database::MySQL::InnoDBMigration to make sure all tables are in a good engine state. Run /opt/otrs/bin/otrs.SetPermissions.pl --otrs-user=otrs --web-group=apache as root to fix permissions (with your correct otrs user and web group - Debian is probably different).

6) Upgrade OTRS 5 to OTRS 6
Follow upgrade procedures at https://doc.otrs.com/doc/manual/admin/6 ... ating.html

Procedure Notes:
On step 4 run bin/otrs.Console.pl Dev::Tools::Migrate::ConfigXMLStructure --source-directory Kernel/Config/Files

Run bin/otrs.CheckkModules.pl and fulfill requirements. Next run otrs.Console.pl Maint::Database::Check –repair

I encountered errors during DBUpdate-to-6.pl due to Foreign Key issues in the database between the ticket_history and article_id tables. If you encounter errors it is safe to repeatedly run DBUpdate-to-6.pl until it is successful (as you resolve errors).

I resolved these FK errors by:

Backing up data from:

Code: Select all

select * from ticket_history
where article_id not in (select id from article)
then deleting it from the database:

Code: Select all

delete from ticket_history
where article_id not in (select id from article)
This caused tickets older than 2008 to lose some information in their ticket history. I was OK with that. After doing so, DBUpdate-to-6.pl finished successfully, and I completed the steps in the upgrade procedure documentation.

7) ...

8) PROFIT!
wurzel
Znuny guru
Posts: 3273
Joined: 08 Jul 2010, 22:25
Znuny Version: x.x.x
Real Name: Florian

Re: Recommendation for upgrading OTRS 3.1.2 (Debian6)

Post by wurzel »

Hi,
synced21 wrote: 05 Dec 2019, 18:44 So you’re installing on a Debian 10 otrs 6. Than you move the old otrs which would be in my case otrs 3.1. to otrs6 ? Than installing 5 then 4…
No.
You install OTRS6 completely new on a debian10 system.
After everything is fine, you move /opt/otrs to /opt/otrs-6 and delete the otrs database.

Then you install OTRS5 on the same system.
After everything is fine, you move /opt/otrs to /opt/otrs-5 and delete the otrs database.

go the same way with version 4, 3.3, 3.2.

Now that you know that all new installations are working fine - all perl modules should be installed as well
you follow the upgrade following the official doc.otrs.org upgrading steps.

If you get an error during installing 3.3.x for example, (because of failing dependencies or missing perl modules)
you have to use debian9 or debian8 to install 3.3.x

You have to test it.

But once you have all otrs versions running start upgrading.
synced21 wrote: And Debian is installing the newest one of course which are not compatible with otrs3.1.
so as I said. Use a supported debian version, where your otrs versions would run.

In short:
follow the doc.otrs.org and upgrading documentations from each version.


there are many ways of upgrading. The obove is the way, I would do it.

Flo
OTRS 2025 SILVER (Prod)
OTRS 2025 auf Debian 12 (Test)
Znuny 7.x latest version testing auf Debian 12

-- Ich beantworte keine Forums-Fragen PN - No PN please

I won't answer to unfriendly users any more. A greeting and regards are just polite.
Locked