OTSRCloneDB Windows Migration

Moderator: crythias

Post Reply
Sayannara
Znuny advanced
Posts: 118
Joined: 22 May 2012, 12:37
Znuny Version: OTRS 7.06
Real Name: Yann
Company: FVE
Contact:

OTSRCloneDB Windows Migration

Post by Sayannara »

I have the feeling to be abandoned with the migration of OTRS from Windows to Linux. Before with the appliance it was pretty easy but things changed.
Does the script OTRSCloneDB work if I use MySQL or MS SQL ? Or should I only use postgresql ?
Search found 0 matches: OTSRCloneDB
Thank you.
Centos 7 / OTRS::ITSM 6 Business Solutions / MariaDB / Apache
Rooobaaat
Znuny wizard
Posts: 432
Joined: 11 Sep 2014, 16:28
Znuny Version: OTRS 5.0.x

Re: OTSRCloneDB Windows Migration

Post by Rooobaaat »

You can convert your PostgreSQL database to MySQL, Oracle or "just copy" it to another PostgreSQL database.
My english is better than your german :P

"Produktiv": OTRS: 5.0.x, OTRS::ITSM 5.0.x
"Testing": OTRS 6 git
OS: Debian 8.0 (Jessie)
Apache2.4.10/MySQL 5.5.41
Sayannara
Znuny advanced
Posts: 118
Joined: 22 May 2012, 12:37
Znuny Version: OTRS 7.06
Real Name: Yann
Company: FVE
Contact:

Re: OTSRCloneDB Windows Migration

Post by Sayannara »

Thanks for your reply.

While installing OTRS 5 with installer.pl it asks me if I want a new or existing DB. Can I simply plug the DB of my existing OTRS 3 ?
Centos 7 / OTRS::ITSM 6 Business Solutions / MariaDB / Apache
jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: OTSRCloneDB Windows Migration

Post by jojo »

no, you have to follow the UPGRADING Docs
"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
Sayannara
Znuny advanced
Posts: 118
Joined: 22 May 2012, 12:37
Znuny Version: OTRS 7.06
Real Name: Yann
Company: FVE
Contact:

Re: OTSRCloneDB Windows Migration

Post by Sayannara »

Okay thanks.

My Linux installation is ready. According to this link https://otrs.github.io/doc/manual/admin ... ndows.html I have to install on my Windows based system, the latest version of OTRSCloneDB. From the dropdown list there is only "OTRS Free Features". And when I download the package from the OTRS FTP, I try to install it then I get an error message saying:
Backend ERROR: OTRS-CGI-01 Perl: 5.12.3 OS: MSWin32 Time: Fri Oct 30 16:26:49 2015 Message: Sorry, can't install/upgrade package, because the framework version required by the package (5.0.x;) does not match your Framework (3.1.11)! Traceback (1344): Module: Kernel::System::Package::_CheckFramework (v1.130.2.5) Line: 2229 Module: Kernel::System::Package::PackageInstall (v1.130.2.5) Line: 416 Module: Kernel::Modules::AdminPackageManager::_InstallHandling (v1.108) Line: 1483 Module: Kernel::Modules::AdminPackageManager::Run (v1.108) Line: 1050 Module: Kernel::System::Web::InterfaceAgent::Run (v1.64) Line: 868 Module: ModPerl::ROOT::ModPerl::Registry::D_3a_OTRS_OTRS_bin_cgi_2dbin_index_2epl::handler (unknown version) Line: 46 Module: (eval) (v1.90) Line: 204 Module: ModPerl::RegistryCooker::run (v1.90) Line: 204 Module: ModPerl::RegistryCooker::default_handler (v1.90) Line: 170 Module: ModPerl::Registry::handler (v1.99) Line: 31
I tried all versions of OTRSCloneDB that the same issue.

I know it used to work. At this point I don't know what I can do. Should I change the version directly in the script file ?

Any help would be really appreciated.
Centos 7 / OTRS::ITSM 6 Business Solutions / MariaDB / Apache
jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: OTSRCloneDB Windows Migration

Post by jojo »

you have to upgrade first to 3.3. But if you are on a mysql database clone db is not needed you can directly start migration following all steps (3.1.x -> 3.2.latest -> 3.3.latest -> 4.0.latest -> 5.0.latest)
"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
Sayannara
Znuny advanced
Posts: 118
Joined: 22 May 2012, 12:37
Znuny Version: OTRS 7.06
Real Name: Yann
Company: FVE
Contact:

Re: OTSRCloneDB Windows Migration

Post by Sayannara »

Thank you for your quick answer.

I understood that next step for me is to upgrade to 3.2 -> 3.3 and then with 3.3 I'd be able to install the package OTRSCloneDB.

I do have with my Windows installation a mysql database.

If I understand, main steps are:
  1. upgrade my Windows installation to 3.3
  2. install my Linux installation to 3.3 as well
  3. Use the same mysql database
  4. update 3.3->4.0->5.0
Is this correct ?
Centos 7 / OTRS::ITSM 6 Business Solutions / MariaDB / Apache
Sayannara
Znuny advanced
Posts: 118
Joined: 22 May 2012, 12:37
Znuny Version: OTRS 7.06
Real Name: Yann
Company: FVE
Contact:

Re: OTSRCloneDB Windows Migration

Post by Sayannara »

Please if someone could confirm or correct me with the main steps so I don't waste time it would be really nice.
Centos 7 / OTRS::ITSM 6 Business Solutions / MariaDB / Apache
Sayannara
Znuny advanced
Posts: 118
Joined: 22 May 2012, 12:37
Znuny Version: OTRS 7.06
Real Name: Yann
Company: FVE
Contact:

Re: OTSRCloneDB Windows Migration

Post by Sayannara »

Am I asking stupid question ? Is this clear for all but not for me ? :(
Centos 7 / OTRS::ITSM 6 Business Solutions / MariaDB / Apache
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: OTSRCloneDB Windows Migration

Post by crythias »

I, personally, am not sure where you confusion lies.

In my opinion, you should filesystem install the next release you're going to upgrade to at your destination and then do a database restore, file copy, and schema update according to Upgrading docs.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Sayannara
Znuny advanced
Posts: 118
Joined: 22 May 2012, 12:37
Znuny Version: OTRS 7.06
Real Name: Yann
Company: FVE
Contact:

Re: OTSRCloneDB Windows Migration

Post by Sayannara »

Okay, again, thank you for your time. I'll try to explain where my confusion lies...

I am a sys admin (99% windows), I don't know much about DB, perl, linux, or application such OTRS. However I installed OTRS three years ago and we are glad with it so I need to migrate and update OTRS without losing data.

Upgrading the OTRS Framework with https://otrs.github.io/doc/manual/admin ... ading.html should be Okay. But I need to clarify how to migrate my current intallation to Linux.
  • As I have a mysql database (hallelujah) I don't need OTRSCloneDB right ?
  • Updating my Windows installation to 3.1->3.2->3.3 before migrating to Linux is only required if I need OTRSCloneDB ?
  • In order to migrate from Windows to Linux, do I need the same version of OTRS for the source and destination ? Or the next release at my destination ?
Centos 7 / OTRS::ITSM 6 Business Solutions / MariaDB / Apache
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: OTSRCloneDB Windows Migration

Post by crythias »

Sayannara wrote:As I have a mysql database (hallelujah) I don't need OTRSCloneDB right ?
Right, just mysqldump and mysql restore. Use a popular search engine to determine how to backup and restore a MySQL database.
Sayannara wrote:Updating my Windows installation to 3.1->3.2->3.3 before migrating to Linux is only required if I need OTRSCloneDB ?
I've already addressed this. Install your next OTRS upgrade step on the destination (If your Windows is 3.1.x, install 3.2.latest on Linux), then restore the database on Linux. Follow the instructions in the Upgrading steps for the other files to copy from Source (Windows) and run the database migration steps. Note that if you're running 3.1 it's possible your database tables aren't running InnoDB. If your MySQLdump .sql file of your export has MyISAM all through it, you may want to global search replace and save as something else just to be safe.
On 3.1->3.2
viewtopic.php?t=20301
On MyISAM to InnoDB:
viewtopic.php?t=16730
Sayannara wrote:In order to migrate from Windows to Linux, do I need the same version of OTRS for the source and destination ? Or the next release at my destination ?
If you wanted the same version, install the same version. If you want to upgrade, this question has already been answered.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Sayannara
Znuny advanced
Posts: 118
Joined: 22 May 2012, 12:37
Znuny Version: OTRS 7.06
Real Name: Yann
Company: FVE
Contact:

Re: OTSRCloneDB Windows Migration

Post by Sayannara »

Okay that's awesome. I replaced the engine for all tables.

In chapter 9 Upgrading Doc I have to run this command:

Okay with

Code: Select all

bin/otrs.CheckDB.pl 
NOkay with

Code: Select all

cat scripts/DBUpdate-to-3.2.mysql.sql | mysql otrs -p -f root -u
I don't even understand the command. Why do we use cat ? Should I understand that we display the file and we sent the content to mysql ?

binary-mode FALSE
FETO1S193:/opt/otrs # cat scripts/DBUpdate-to-3.2.mysql.sql | mysql otrs -p -u otrs -f
Enter password:
ERROR 1091 (42000) at line 7: Can't DROP 'group_read'; check that column/key exists
ERROR 1091 (42000) at line 11: Can't DROP 'group_write'; check that column/key exists
ERROR 1091 (42000) at line 15: Can't DROP 'other_read'; check that column/key exists
ERROR 1091 (42000) at line 19: Can't DROP 'other_write'; check that column/key exists
ERROR 1091 (42000) at line 20: Can't DROP 'ticket_answered'; check that column/key exists
ERROR 1091 (42000) at line 24: Can't DROP 'ticket_answered'; check that column/key exists
ERROR 1091 (42000) at line 29: Can't DROP 'group_id'; check that column/key exists
ERROR 1050 (42S01) at line 34: Table 'pm_process' already exists
ERROR 1050 (42S01) at line 51: Table 'pm_activity' already exists
ERROR 1050 (42S01) at line 66: Table 'pm_activity_dialog' already exists
ERROR 1050 (42S01) at line 81: Table 'pm_transition' already exists
ERROR 1050 (42S01) at line 96: Table 'pm_transition_action' already exists
ERROR 1050 (42S01) at line 111: Table 'pm_entity' already exists
ERROR 1050 (42S01) at line 118: Table 'pm_entity_sync' already exists
ERROR 1060 (42S21) at line 129: Duplicate column name 'internal_field'
ERROR 1062 (23000) at line 135: Duplicate entry 'ProcessManagementProcessID' for key 'dynamic_field_name'
ERROR 1062 (23000) at line 141: Duplicate entry 'ProcessManagementActivityID' for key 'dynamic_field_name'
ERROR 1005 (HY000) at line 158: Can't create table 'otrs.#sql-3883_13c539' (errno: 121)
ERROR 1005 (HY000) at line 159: Can't create table 'otrs.#sql-3883_13c539' (errno: 121)
ERROR 1005 (HY000) at line 160: Can't create table 'otrs.#sql-3883_13c539' (errno: 121)
ERROR 1005 (HY000) at line 161: Can't create table 'otrs.#sql-3883_13c539' (errno: 121)
ERROR 1005 (HY000) at line 162: Can't create table 'otrs.#sql-3883_13c539' (errno: 121)
ERROR 1005 (HY000) at line 163: Can't create table 'otrs.#sql-3883_13c539' (errno: 121)
ERROR 1005 (HY000) at line 164: Can't create table 'otrs.#sql-3883_13c539' (errno: 121)
ERROR 1005 (HY000) at line 165: Can't create table 'otrs.#sql-3883_13c539' (errno: 121)
ERROR 1005 (HY000) at line 166: Can't create table 'otrs.#sql-3883_13c539' (errno: 121)
ERROR 1005 (HY000) at line 167: Can't create table 'otrs.#sql-3883_13c539' (errno: 121)

I'm upgrading from (Windows) 3.1 to 3.2 (OpenSuse 13). My database is mysql.
It seems to be something with constraint.
You will get this message if you're trying to add a constraint with a name that's already used somewhere else
Any suggestion ?
Centos 7 / OTRS::ITSM 6 Business Solutions / MariaDB / Apache
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: OTSRCloneDB Windows Migration

Post by crythias »

Sayannara wrote:I don't even understand the command. Why do we use cat ? Should I understand that we display the file and we sent the content to mysql ?
cat filename displays the file (actually, it conCATenates files together, but outputs to the screen by default, as does most linux commands.) But that's just where the output is sent, the pipe | says send it to a command. The equivalent, more or less is to do:

command -args < filename
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: OTSRCloneDB Windows Migration

Post by crythias »

If it can't find it to drop, that's not a problem. It's already dropped.
If it already exists, that's not a problem, it doesn't need to exist again.
Can't create table 'otrs.#sql-3883_13c539' means the database isn't innodb.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Sayannara
Znuny advanced
Posts: 118
Joined: 22 May 2012, 12:37
Znuny Version: OTRS 7.06
Real Name: Yann
Company: FVE
Contact:

Re: OTSRCloneDB Windows Migration

Post by Sayannara »

Thank you Crythias your help is precious.

As it is complicated to open my file dump.sql with a gui editor I used sed
sed -e 's/MyISAM/InnoDB/g' -i '/home/admin/otrs_restore/dump.sql'
I'll check and come back.
Edit: okay... you said the engine for the DB, I suppose you meant tables of the db ?

I checked with

Code: Select all

SHOW CREATE TABLE article;

Code: Select all

) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 |
I also opened the dump file and insure I could not find an occurrence of MyISAM. There was none.

Silly question but do I have to resolve this ? Any thought ?

MariaDB [otrs]> SHOW CREATE TABLE pm_process;
+------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table |

| pm_process | CREATE TABLE `pm_process` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`entity_id` varchar(50) NOT NULL,
`name` varchar(200) NOT NULL,
`state_entity_id` varchar(50) NOT NULL,
`layout` longblob NOT NULL,
`config` longblob NOT NULL,
`create_time` datetime NOT NULL,
`create_by` int(11) NOT NULL,
`change_time` datetime NOT NULL,
`change_by` int(11) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `pm_process_entity_id` (`entity_id`),
KEY `FK_pm_process_create_by_id` (`create_by`),
KEY `FK_pm_process_change_by_id` (`change_by`),
CONSTRAINT `FK_pm_process_change_by_id` FOREIGN KEY (`change_by`) REFERENCES `users` (`id`),
CONSTRAINT `FK_pm_process_create_by_id` FOREIGN KEY (`create_by`) REFERENCES `users` (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=utf8 |
It seems all good.... I took a snapshot and I'll try to go further.
Centos 7 / OTRS::ITSM 6 Business Solutions / MariaDB / Apache
Sayannara
Znuny advanced
Posts: 118
Joined: 22 May 2012, 12:37
Znuny Version: OTRS 7.06
Real Name: Yann
Company: FVE
Contact:

Re: OTSRCloneDB Windows Migration

Post by Sayannara »

Upgrading doc 10, 11 > After rebuildConfig.pl and DeleteCache.pl > restart services > OKAY

As many I have the "Core.UI.Datepicker.js" issue on http://localhost/otrs/index.pl so the button "Connexion" is gray out. :(

I found that thread => viewtopic.php?t=19079
who crythias explains that "the new release has been installed not over". For me that's a new installation (at least on the Linux server)
I have nothing relevant in access.log and error.log

That thread => viewtopic.php?f=53&t=21908&p=86648&hili ... .js#p86648
Which is interesting

That thread => viewtopic.php?f=35&t=19753&p=77655&hili ... .js#p77655
which is in german, I translated the answer => "the Loader :: Agent :: CommonJS ### 000 framework had to be in default reset." Should I then reset something ?

That thread => viewtopic.php?f=62&t=17930&p=70159&hili ... .js#p70159
No answer.


I found /etc/apache2/conf.d/otrs.conf with

Code: Select all

ScriptAlias /otrs/ "/opt/otrs/bin/cgi-bin/"
Alias /otrs-web/ "/opt/otrs/var/httpd/htdocs/"
Should I merge these folders ? Or modify settings in a specific file ?
What error did I do ?


The end of the upgrade is near, I really need your help.
Centos 7 / OTRS::ITSM 6 Business Solutions / MariaDB / Apache
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: OTSRCloneDB Windows Migration

Post by crythias »

I'm sorry. I can't really be more of assistance via forum.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Post Reply