Migrate tickets from old version to new (3.0.11 -> 3.3.8)

Moderator: crythias

Locked
banzayats
Znuny newbie
Posts: 12
Joined: 12 Dec 2011, 10:05
Znuny Version: OTRS 3.1.0.beta2
Company: Eximbank
Location: Kiev, Uktraine

Migrate tickets from old version to new (3.0.11 -> 3.3.8)

Post by banzayats »

Dear community!
Our organization uses OTRS for a long time and we have a large archive of tickets, FAQ's and CMDB items. It's not difficult to export\import FAQ and CMDB items, but how can I export the archive of the tickets from old OTRS, and then import them into the new one?
We have the old version (3.0.11) which installed on the old linux distributive (Fedora 11). Also we installed KIX4OTRS add-on, and we changed some code for our purposes. So it is unknown how successful will be the sequentially upgrade (3.0->3.1->3.2->3.3).
Proceeding from the above, I decided to do the following:
  • configure a new server with modern distribution (Centos 7);
  • install the latest version of OTRS (3.3.8);
  • export the data (tickets, FAQ, CMDB) from the old system;
  • import data into the new system;
  • configure a new system.
What is the best solution in this situation?
We use a file system to store tickets (ArticleStorageFS). Is there any script that is able to export tickets from OTRS? Should I upgrade the database structure or I can only export/import some tables?
I would be grateful for your advice.
Last edited by banzayats on 29 Jul 2014, 16:09, edited 1 time in total.
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Migrate tickets from old version to new (3.0.11 -> 3.3.8

Post by jojo »

you have to follow the upgrade path to keep all tickets
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
banzayats
Znuny newbie
Posts: 12
Joined: 12 Dec 2011, 10:05
Znuny Version: OTRS 3.1.0.beta2
Company: Eximbank
Location: Kiev, Uktraine

Re: Migrate tickets from old version to new (3.0.11 -> 3.3.8

Post by banzayats »

But if I follow the upgrade path I will get a buggy (I can't predict how the changes in the code will affect the future work) application on the outdated linux distributive.
Why can't I just export tickets from old application and import them to new?
banzayats
Znuny newbie
Posts: 12
Joined: 12 Dec 2011, 10:05
Znuny Version: OTRS 3.1.0.beta2
Company: Eximbank
Location: Kiev, Uktraine

Re: Migrate tickets from old version to new (3.0.11 -> 3.3.8

Post by banzayats »

jojo wrote:you have to follow the upgrade path to keep all tickets
You were right.
The only correct option was a sequentially upgrade. The upgrade process was successful. Only in the end I had a few errors, but they disappeared after reinstalling packages.
Here is the steps:

============ 3.0.11 -> 3.1.21 ==============
1. Create a backup of current OTRS
2. Copy a backup to the new server
3. Restore database on the new server:
mysql> CREATE DATABASE otrs CHARACTER SET utf8;
shell> mysql -p -h localhost otrs < DatabaseBackup.sql
4. Stop services:
shell> service crond stop
shell> service postfix stop
shell> service httpd stop
5. Download and install the next version of OTRS:
shell> wget http://ftp.otrs.org/pub/otrs//RPMS/rhel ... noarch.rpm
shell> rpm -ivh otrs-3.1.21-01.noarch.rpm
6. Replace the following files from backup:
Kernel/Config.pm
Kernel/Config/GenericAgent.pm
Kernel/Config/Files/ZZZAuto.pm
var/*
7. Set the file permissions:
shell> cd /opt/otrs/
shell> bin/otrs.SetPermissions.pl --otrs-user=otrs --web-user=apache --otrs-group=apache --web-group=apache /opt/otrs
8. Update the database:
8.1 Schema update part #1:
shell> cat scripts/DBUpdate-to-3.1.mysql.sql | mysql -p -f -u root otrs
8.2 Check the connection settings to the database in the file Kernel/Config.pm and run the database migration script:
shell> scripts/DBUpdate-to-3.1.pl
Do not continue the upgrading process if this script did not work properly for you. Otherwise data loss may occur.
8.3 Schema update part #2:
shell> cat scripts/DBUpdate-to-3.1-post.mysql.sql | mysql -p -f -u root otrs
9. Updating the configuration:
shell> bin/otrs.RebuildConfig.pl
shell> bin/otrs.DeleteCache.pl
10. The first stage is finished. More information about the changes in the new version can be found in the file UPGRADING

============ 3.1.21 -> 3.2.16 ==============
1. Download and update to the next version of OTRS:
shell> wget http://ftp.otrs.org/pub/otrs//RPMS/rhel ... noarch.rpm
shell> rpm -Uvh otrs-3.2.16-01.noarch.rpm
OTRS will automatically save the old configuration files
2. Set the file permissions:
shell> cd /opt/otrs/
shell> bin/otrs.SetPermissions.pl --otrs-user=otrs --web-user=apache --otrs-group=apache --web-group=apache /opt/otrs
3. Check the required Perl modules and install the missing:
shell> /opt/otrs/bin/otrs.CheckModules.pl
4. Update the database:
4.1 Run a script that will change the storage system from MyISAM to InnoDB:
shell> bin/otrs.MySQLInnoDBSwitch.pl
4.2 Check the settings of the database:
shell> bin/otrs.CheckDB.pl
4.3 Update the schema:
shell> cat scripts/DBUpdate-to-3.2.mysql.sql | mysql -p -f -u root otrs
4.4 Run the database migration script (as user 'otrs'):
Find the user otrs in file /etc/passwd:
Change:
otrs:x:503:48:OTRS System User:/opt/otrs/:/bin/false
to:
otrs:x:503:48:OTRS System User:/opt/otrs/:/bin/bash
shell> su - otrs
shell> scripts/DBUpdate-to-3.2.pl
Do not continue the upgrading process if this script did not work properly for you. Otherwise data loss may occur.
5. Updating the configuration:
shell> bin/otrs.RebuildConfig.pl
shell> bin/otrs.DeleteCache.pl
6.Remove metadata from archived tickets (Optional).
shell> bin/otrs.CleanupTicketMetadata.pl --archived
Or if you want to save all information then in SysConfig you should change to 'No' the following settings:
Ticket::ArchiveSystem::RemoveSeenFlags
Ticket::ArchiveSystem::RemoveTicketWatchers
7. The second stage is finished. More information about the changes in the new version can be found in the file UPGRADING.md

============ 3.2.16 -> 3.3.8 ==============
1. Download and update to the next version of OTRS:
shell> wget http://ftp.otrs.org/pub/otrs//RPMS/rhel ... noarch.rpm
shell> rpm -Uvh otrs-3.3.8-01.noarch.rpm
OTRS will automatically save the old configuration files
2. Set the file permissions:
shell> cd /opt/otrs/
shell> bin/otrs.SetPermissions.pl --otrs-user=otrs --web-user=apache --otrs-group=apache --web-group=apache /opt/otrs
3. Check the required Perl modules and install the missing:
shell> /opt/otrs/bin/otrs.CheckModules.pl
4. Update the database:
4.1 Check the settings of the database:
shell> bin/otrs.CheckDB.pl
4.2 Update the schema:
shell> cat scripts/DBUpdate-to-3.3.mysql.sql | mysql -p -f -u root otrs
4.3 Run the database migration script (as user 'otrs'):
shell> su - otrs
shell> scripts/DBUpdate-to-3.3.pl
Do not continue the upgrading process if this script did not work properly for you. Otherwise data loss may occur.
5. Updating the configuration (as user 'otrs'):
shell> su - otrs
shell> bin/otrs.RebuildConfig.pl
shell> bin/otrs.DeleteCache.pl
6. Start services:
shell> service httpd start
shell> service postfix start
shell> service crond start
shell> service otrs start
7. In the "Package Manager" update/install or remove obsolete packages

The update is finished!
Giulio Soleni
Znuny wizard
Posts: 392
Joined: 30 Dec 2010, 14:35
Znuny Version: 6.0.x and 5.0.x
Real Name: Giulio Soleni
Company: IKS srl

Re: Migrate tickets from old version to new (3.0.11 -> 3.3.8

Post by Giulio Soleni »

Hi,
did you already installed OTRS on CentOS 7?
I am trying right now but I noticed that mod_perl is not available anymore for CentOS 7 distro (neither for RHEL7).
Thus installing otrs (at least from rpm) seems not to be possible.

I also read this: https://www.huntingbears.nl/2013/12/17/ ... -centos-7/

I am going to start a thread here in the forum asking if in the roadmap of OTRS there is the substitution of mod_perl with plack or if there is any other workaround available to install OTRS on CentOS or RHEL 7

EDIT:
mod_perl is indeed available on beta epel repositories: http://ftp-stud.hs-esslingen.de/pub/epe ... noarch.rpm tho, I don't know if the allegedly incompatibilities of mod_perl with Apache 2.4 have been truly solved or not.

Else ... once OTRS has been installed, you should change a line in /etc/sysconfig/otrs since the check to know if apache is running has a different syntax in CENTOS 7; you have to set

OTRS_USED_WEBSERVER_TEST="/bin/systemctl is-active httpd"
OTRS 6.0.x on CentOS 7.x with MariaDB 10.2.x database connected to an Active Directory for Agents and Customers.
ITSM and FAQ modules installed.
Locked