Once upon a time, one of my boss came to me and said :
"Hey, I found out there's a new version for OTRS that is more beautiful than the current one ! Let's migrate to the newest version of OTRS ! That should be easy. This is YOUR responsibility now. "
"Err ... The guy who first installed it did it on Windows", I answered. And I think most of you know why I was so nervous.
And indeed, it has been such a pain in the [...] to migrate from Windows to Linux from a 3.2.9 version (in order to migrate to 3.3, 4.0 and finally 5.0).
And I'm just started since I'm stuck with the Windows to Linux part !
I tried following this guide to migrate to Linux 3.2.9 :
https://otrs.github.io/doc/manual/admin ... s-to-linux
Yes, I know ... That's for 4.0. But I was thinking that maybe it could solve my issue. There were some errors, that was a little bit messy, but at last I thought I had it working ... Except voilà, life is not so simple : all my custom fields disappeared. And I had some errors during the database cloning (only on "Creating structures in target database (phase 2/2)" part). Plus, I find myself unable to migrate to 3.3 because of the previous errors during the cloning operation.
Nota :
- OTRS on Linux 3.2.9 without any data was working fine after installation,
- I dropped the previous otrs database before doing the cloneDB actions,
- I am using the 1.0.13 version of OTRSCloneDB,
- I am using Mariadb (mysql) on CentOS 7.
What I did :
The dry run was successful :
Code: Select all
"Dry run succesfully finished."
Code: Select all
C:\otrs\OTRS\bin>perl otrs.CloneDB.pl -r -f
[2016-05-19 15:33:55] Generating DDL for OTRS.
[2016-05-19 15:33:55] Generating DDL for package GeneralCatalog.
[2016-05-19 15:33:55] Generating DDL for package ImportExport.
[2016-05-19 15:33:55] Generating DDL for package ITSMCore.
[2016-05-19 15:33:55] Generating DDL for package ITSMChangeManagement.
[2016-05-19 15:33:55] Generating DDL for package ITSMConfigurationManagement.
[2016-05-19 15:33:55] Generating DDL for package ITSMIncidentProblemManagement
[2016-05-19 15:33:55] Generating DDL for package OTRSCloneDB.
[2016-05-19 15:33:55] Generating DDL for package Support.
[2016-05-19 15:33:55] Creating structures in target database (phase 1/2)......
..............................................................................
........................................... done.
[2016-05-19 15:33:55] Converting table article...
Inserting 1000 of 31209
Inserting 2000 of 31209
[...]
[2016-05-19 15:36:34] Finished converting table xml_storage.
Code: Select all
[2016-05-19 15:36:34] Creating structures in target database (phase 2/2)........
................................................................................
......................DBD::mysql::db do failed: Cannot add or update a child row
: a foreign key constraint fails (`otrs`.`#sql-681_d`, CONSTRAINT `FK_article_cr
eate_by_id` FOREIGN KEY (`create_by`) REFERENCES `users` (`id`)) at C:/otrs/OTRS
/Kernel/System/DB.pm line 475.
ERROR: OTRS-otrs.CloneDB.pl-10 Perl: 5.12.3 OS: MSWin32 Time: Thu May 19 15:37:1
7 2016
Message: Cannot add or update a child row: a foreign key constraint fails (`otr
s`.`#sql-681_d`, CONSTRAINT `FK_article_create_by_id` FOREIGN KEY (`create_by`)
REFERENCES `users` (`id`)), SQL: 'ALTER TABLE article ADD CONSTRAINT FK_article_
create_by_id FOREIGN KEY (create_by) REFERENCES users (id)'
Traceback (3728):
Module: Kernel::System::CloneDB::Backend::PopulateTargetStructuresPost (OTRS
3.2.9) Line: 468
Module: otrs.CloneDB.pl (unknown version) Line: 99
.ERROR: Could not generate structures in target database!
Thanks in advance,
Jordan