Migrate OTRS from windows to linux.

So in the /opt/otrs/Kernel/Config/Defaults.pm file you must have some
filesystem references from the Windows system. You will need to go
through the file and update them to the linux paths.
For what it's worth, Kernel/Config/Defaults.pm should *never* be
edited (it does say so at the top of the file, though yes even I have
manually edited things in this as it's easier than trying to figure
out how to put part of an array into Kernel/Config.pm - just means you
have to watch out on upgrades incase your custom options get wiped
out).
So I would probably grab a fresh copy of the Kernel/Config/Defaults.pm
from the OTRS source bundle, then do a diff and see what you have in
yours that is different to the source one.
Steve
On 21 August 2012 10:50, Israel Garcia
Hi Steve,
I have done all steps talked in this thread but when run this two scripts see he error:
[root@otrs2 var]# /opt/otrs/bin/otrs.RebuildConfig.pl ERROR: Can't read C:/ARCHIV~1/OTRS/OTRS/RELEASE: No such file or directory This file is needed by central system parts of OTRS, the system will not work without this file. Died at /opt/otrs/Kernel/Config/Defaults.pm line 2183.
[root@otrs2 var]# /opt/otrs/bin/otrs.DeleteCache.pl ERROR: Can't read C:/ARCHIV~1/OTRS/OTRS/RELEASE: No such file or directory This file is needed by central system parts of OTRS, the system will not work without this file. Died at /opt/otrs/Kernel/Config/Defaults.pm line 2183.
I think it's reading a file from the windows server... any idea on how to solve this...
Thanks tons..

Hi Steven and Israel, don't edit Defaults.pm. Just make the changes that cannot be done with AdminSysConfig in Kernel/Config.pm. This file will never be overwritten by a system update. Regards, mg Am 21.08.12 12:02, schrieb Steven Carr:
So in the /opt/otrs/Kernel/Config/Defaults.pm file you must have some filesystem references from the Windows system. You will need to go through the file and update them to the linux paths.
For what it's worth, Kernel/Config/Defaults.pm should *never* be edited (it does say so at the top of the file, though yes even I have manually edited things in this as it's easier than trying to figure out how to put part of an array into Kernel/Config.pm - just means you have to watch out on upgrades incase your custom options get wiped out).
So I would probably grab a fresh copy of the Kernel/Config/Defaults.pm from the OTRS source bundle, then do a diff and see what you have in yours that is different to the source one.
Steve
On 21 August 2012 10:50, Israel Garcia
wrote: Hi Steve,
I have done all steps talked in this thread but when run this two scripts see he error:
[root@otrs2 var]# /opt/otrs/bin/otrs.RebuildConfig.pl ERROR: Can't read C:/ARCHIV~1/OTRS/OTRS/RELEASE: No such file or directory This file is needed by central system parts of OTRS, the system will not work without this file. Died at /opt/otrs/Kernel/Config/Defaults.pm line 2183.
[root@otrs2 var]# /opt/otrs/bin/otrs.DeleteCache.pl ERROR: Can't read C:/ARCHIV~1/OTRS/OTRS/RELEASE: No such file or directory This file is needed by central system parts of OTRS, the system will not work without this file. Died at /opt/otrs/Kernel/Config/Defaults.pm line 2183.
I think it's reading a file from the windows server... any idea on how to solve this...
Thanks tons..
--------------------------------------------------------------------- OTRS mailing list: otrs - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/otrs To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs
-- Martin Gruner Senior Developer R&D OTRS AG Europaring 4 94315 Straubing T: +49 (0)6172 681988 0 F: +49 (0)9421 56818 18 I: www.otrs.com/ Geschäftssitz: Bad Homburg, Amtsgericht: Bad Homburg, HRB 10751, USt-Nr.: DE256610065 Aufsichtsratsvorsitzender: Burchard Steinbild, Vorstand: André Mindermann (Vorsitzender), Christopher Kuhn, Sabine Riedel Verbinden wir uns! OTRS 3.1 schafft einfachere Integration mit Drittapplikationen – Für Frühbucher zum Vorzugspreis: http://www.otrs.com/index.php?id=2361&L=1

Yep, like I commented it's easier to make a single line change to the
Defaults.pm file than to copy a whole array structure into Config.pm
and then risk losing "new" functionality when the array in Defaults.pm
is updated. I have a diff file which I use to reapply only the changes
I made.
In particular the option that I modified was to enable the Customer
Company functionality - adding UserCompanyID into the
$Self->{CustomerUser} => Map[] variable. Would be nice if this
functionality was just added into the code permanently, not sure why
it isn't in there with an option in SysConfig to simply enable/disable
it.
Steve
On 21 August 2012 12:12, Martin Gruner
Hi Steven and Israel,
don't edit Defaults.pm. Just make the changes that cannot be done with AdminSysConfig in Kernel/Config.pm. This file will never be overwritten by a system update.
Regards, mg
Am 21.08.12 12:02, schrieb Steven Carr:
So in the /opt/otrs/Kernel/Config/Defaults.pm file you must have some filesystem references from the Windows system. You will need to go through the file and update them to the linux paths.
For what it's worth, Kernel/Config/Defaults.pm should *never* be edited (it does say so at the top of the file, though yes even I have manually edited things in this as it's easier than trying to figure out how to put part of an array into Kernel/Config.pm - just means you have to watch out on upgrades incase your custom options get wiped out).
So I would probably grab a fresh copy of the Kernel/Config/Defaults.pm from the OTRS source bundle, then do a diff and see what you have in yours that is different to the source one.
Steve
On 21 August 2012 10:50, Israel Garcia
wrote: Hi Steve,
I have done all steps talked in this thread but when run this two scripts see he error:
[root@otrs2 var]# /opt/otrs/bin/otrs.RebuildConfig.pl ERROR: Can't read C:/ARCHIV~1/OTRS/OTRS/RELEASE: No such file or directory This file is needed by central system parts of OTRS, the system will not work without this file. Died at /opt/otrs/Kernel/Config/Defaults.pm line 2183.
[root@otrs2 var]# /opt/otrs/bin/otrs.DeleteCache.pl ERROR: Can't read C:/ARCHIV~1/OTRS/OTRS/RELEASE: No such file or directory This file is needed by central system parts of OTRS, the system will not work without this file. Died at /opt/otrs/Kernel/Config/Defaults.pm line 2183.
I think it's reading a file from the windows server... any idea on how to solve this...
Thanks tons..
--------------------------------------------------------------------- OTRS mailing list: otrs - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/otrs To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs
-- Martin Gruner Senior Developer R&D
OTRS AG Europaring 4 94315 Straubing
T: +49 (0)6172 681988 0 F: +49 (0)9421 56818 18 I: www.otrs.com/
Geschäftssitz: Bad Homburg, Amtsgericht: Bad Homburg, HRB 10751, USt-Nr.: DE256610065 Aufsichtsratsvorsitzender: Burchard Steinbild, Vorstand: André Mindermann (Vorsitzender), Christopher Kuhn, Sabine Riedel
Verbinden wir uns! OTRS 3.1 schafft einfachere Integration mit Drittapplikationen – Für Frühbucher zum Vorzugspreis: http://www.otrs.com/index.php?id=2361&L=1
--------------------------------------------------------------------- OTRS mailing list: otrs - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/otrs To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs

Hi Steve, I think Perl supports this out of the box. :D Try something like: push @{$Self->{CustomerUser}->{Map}}, [ your additional settings here ... ]; Best regards, mg Am 21.08.12 14:01, schrieb Steven Carr:
Yep, like I commented it's easier to make a single line change to the Defaults.pm file than to copy a whole array structure into Config.pm and then risk losing "new" functionality when the array in Defaults.pm is updated. I have a diff file which I use to reapply only the changes I made.
In particular the option that I modified was to enable the Customer Company functionality - adding UserCompanyID into the $Self->{CustomerUser} => Map[] variable. Would be nice if this functionality was just added into the code permanently, not sure why it isn't in there with an option in SysConfig to simply enable/disable it.
Steve
On 21 August 2012 12:12, Martin Gruner
wrote: Hi Steven and Israel,
don't edit Defaults.pm. Just make the changes that cannot be done with AdminSysConfig in Kernel/Config.pm. This file will never be overwritten by a system update.
Regards, mg
Am 21.08.12 12:02, schrieb Steven Carr:
So in the /opt/otrs/Kernel/Config/Defaults.pm file you must have some filesystem references from the Windows system. You will need to go through the file and update them to the linux paths.
For what it's worth, Kernel/Config/Defaults.pm should *never* be edited (it does say so at the top of the file, though yes even I have manually edited things in this as it's easier than trying to figure out how to put part of an array into Kernel/Config.pm - just means you have to watch out on upgrades incase your custom options get wiped out).
So I would probably grab a fresh copy of the Kernel/Config/Defaults.pm from the OTRS source bundle, then do a diff and see what you have in yours that is different to the source one.
Steve
On 21 August 2012 10:50, Israel Garcia
wrote: Hi Steve,
I have done all steps talked in this thread but when run this two scripts see he error:
[root@otrs2 var]# /opt/otrs/bin/otrs.RebuildConfig.pl ERROR: Can't read C:/ARCHIV~1/OTRS/OTRS/RELEASE: No such file or directory This file is needed by central system parts of OTRS, the system will not work without this file. Died at /opt/otrs/Kernel/Config/Defaults.pm line 2183.
[root@otrs2 var]# /opt/otrs/bin/otrs.DeleteCache.pl ERROR: Can't read C:/ARCHIV~1/OTRS/OTRS/RELEASE: No such file or directory This file is needed by central system parts of OTRS, the system will not work without this file. Died at /opt/otrs/Kernel/Config/Defaults.pm line 2183.
I think it's reading a file from the windows server... any idea on how to solve this...
Thanks tons..
--------------------------------------------------------------------- OTRS mailing list: otrs - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/otrs To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs
-- Martin Gruner Senior Developer R&D
OTRS AG Europaring 4 94315 Straubing
T: +49 (0)6172 681988 0 F: +49 (0)9421 56818 18 I: www.otrs.com/
Geschäftssitz: Bad Homburg, Amtsgericht: Bad Homburg, HRB 10751, USt-Nr.: DE256610065 Aufsichtsratsvorsitzender: Burchard Steinbild, Vorstand: André Mindermann (Vorsitzender), Christopher Kuhn, Sabine Riedel
Verbinden wir uns! OTRS 3.1 schafft einfachere Integration mit Drittapplikationen – Für Frühbucher zum Vorzugspreis: http://www.otrs.com/index.php?id=2361&L=1
--------------------------------------------------------------------- OTRS mailing list: otrs - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/otrs To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs
OTRS mailing list: otrs - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/otrs To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs
-- Martin Gruner Senior Developer R&D OTRS AG Europaring 4 94315 Straubing T: +49 (0)6172 681988 0 F: +49 (0)9421 56818 18 I: www.otrs.com/ Geschäftssitz: Bad Homburg, Amtsgericht: Bad Homburg, HRB 10751, USt-Nr.: DE256610065 Aufsichtsratsvorsitzender: Burchard Steinbild, Vorstand: André Mindermann (Vorsitzender), Christopher Kuhn, Sabine Riedel Verbinden wir uns! OTRS 3.1 schafft einfachere Integration mit Drittapplikationen – Für Frühbucher zum Vorzugspreis: http://www.otrs.com/index.php?id=2361&L=1

It probably does but at the time my brain wasn't in the mood to figure
it out lol (might be worth updating the OTRS documentation on how to
correctly edit the Config.pm file though) ;)
Steve
On 21 August 2012 13:24, Martin Gruner
Hi Steve,
I think Perl supports this out of the box. :D Try something like:
push @{$Self->{CustomerUser}->{Map}}, [ your additional settings here ... ];
Best regards, mg

OK, As I promised here is what I did to migrate OTRS v3.0.11 from a windows to a Centos linux box.
FIRST: This worked for me, it's not an official tutorial neither approved by OTRS team. Use it at your own risk. ;)
Before migration:
OTRS v3.0.11 running on a windows XP box.
Goal:
Migrate the same version to a linux box maintaining all data as in the windows server.
Steps to migrate same version 3.0.11 from the window to linux.
- Install a fresh CentOS 6.3 with all updates.
- Install OTRS v 3.0.11 following this URL: http://www.blog.paranoidpenguin.net/2012/04/how-to-install-otrs-3-1-on-cento... but using v 3.0.11 instead 3.1.3, also I used postfix instead sendmail.
- versions of some software:
[root@otrs2 sys]# rpm -qa|grep otrs
otrs-3.0.11-03.noarch
[root@otrs2 sys]# rpm -qa|grep httpd
httpd-2.2.15-15.el6.centos.1.i686
httpd-tools-2.2.15-15.el6.centos.1.i686
[root@otrs2 sys]# rpm -qa|grep mysql
mysql-libs-5.1.61-4.el6.i686
php-mysql-5.3.3-14.el6_3.i686
mysql-5.1.61-4.el6.i686
mysql-server-5.1.61-4.el6.i686
[root@otrs2 sys]# rpm -qa|grep perl
perl-5.10.1-127.el6.i686
- Backup to MYSQL database on Windows.
C:\>"C:\Archivos de programa\OTRS\mysql\bin\mysqldump.exe" -uroot -p otrs > otrsbk.sql
-Copied these files to my PC for copying later to the linux box:
Kernel/Config.pm
Kernel/Config/GenericAgent.pm
Kernel/Config/Files/ZZZAuto.pm
var/*
- OPTIONAL: make a backup of MYSQL database on the linux side before being deleted.
[root@otrs2 init.d]# mysqldump -u root -p otrs >/tmp/otrs_original_antes_migracion.sql
Enter password:
- DROP database on the linux side stopping first all daemons regarding OTRS (httpd, crond, postfix)
CRON
[root@otrs2 init.d]# service crond stop
Stopping crond: [ OK ]
APACHE
[root@otrs2 init.d]# service httpd stop
Stopping httpd: [ OK ]
POSTFIX
[root@otrs2 init.d]# service postfix stop
[root@otrs2 init.d]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.1.61 Source distribution
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| otrs |
+--------------------+
3 rows in set (0.00 sec)
mysql> drop database otrs;
Query OK, 111 rows affected (0.10 sec)
mysql> exit
Bye
[root@otrs2 init.d]#
- Copy otrsbk,sql file, create new database and import the MYSQL-Windows file in the linux box.
Copy otrsbk.sql to linux:/tmp/
[root@otrs2 init.d]# mysqladmin -u root -p create otrs
Enter password:
[root@otrs2 init.d]# mysql -u otrs -p otrs < /tmp/otrsbk.sql
Enter password:
- Stop all services on the linux box regarding OTRS.
CRON
[root@otrs2 init.d]# service crond stop
Stopping crond: [ OK ]
APACHE
[root@otrs2 init.d]# service httpd stop
Stopping httpd: [ OK ]
MYSQL
[root@otrs2 init.d]# service mysqld stop
Stopping mysqld: [ OK ]
POSTFIX
[root@otrs2 init.d]# service postfix stop
Shutting down postfix: [ OK ]
- Copy these files and folders from my PC to the linux BOX. (NOTE: Recommended to verify all permissions on the copied files before continue)
Kernel/Config.pm
Kernel/Config/GenericAgent.pm
Kernel/Config/Files/ZZZAuto.pm
var/*
- Replaced this string "/ARCHIV~1/OTRS/OTRS/" for this one "/opt/otrs" on these files:
/opt/otrs/Kernel/Config.pm
/opt/otrs/Kernel/Config/Files/ZZZAuto.pm
- Check if database's "otrs" password is the same on the linux box editing this file /opt/otrs/Kernel/Config.pm
# (The password of database user. You also can use bin/CryptPassword.pl
# for crypted passwords.)
$Self->{'DatabasePw'} = 'otrs-password';
- Execute this two scripts:
[root@otrs2 Config]# /opt/otrs/bin/otrs.RebuildConfig.pl
otrs.RebuildConfig.pl
Hi Steve,
I think Perl supports this out of the box. :D Try something like:
push @{$Self->{CustomerUser}->{Map}}, [ your additional settings here ... ];
Best regards, mg
--------------------------------------------------------------------- OTRS mailing list: otrs - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/otrs To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs
participants (3)
-
Israel Garcia
-
Martin Gruner
-
Steven Carr