systembastler
Goto Top

OTRS Win Upgrade von 3.2.8 auf 3.3.12

Hallo Admins,

ich möchte unsere aktuelle OTRS Version 3.2.8 auf die letzte aktuelle Windows Version 3.3.12 aktualisieren um später auf die neue 4er Version zu migrieren.
Wir nutzen als Plattform einen Windows Server 2012. Hier ist meine Vorgehensweise:

1. Snapshot machen
2. Einloggen auf den OTRS Server als Admin
3. Kopie der lokalen OTRS Daten erstellen (in meinem Fall habe ich c:\OTRS in z.B. Ordner C:\Backup-OTRS gespeichert)
4. Config Datei speichern: im Webinterface - Admin - Einstellungen exportieren - die pm Datei abspeichern (C:\Backup-OTRS bietet sich an)
5. MySQL DB sichern - cd c:\OTRS\mysql\bin\ und den DB dump Befehl ausführen mysqldump -uroot otrs > C:\Users\lokalAdmin\Downloads\otrs-db-dump.sql
6. aktuelle OTRS Version 3.2.8 deinstallieren
7. in meinem Fall musste ich den Server neu starten
8. neuste Version 3.3.12 von otrs-3.3.12-win-installer-3.0.6.exe installieren
9. mit mysql Datenbank installieren, denn wir haben ja unseren Dump und den werden wir importieren
10. Die Datei config.pm aus der gesicherten Version in die neue Version C:\otrs\OTRS\Kernel kopieren und die Original Config.pm überschreiben / umbenennen
11. neue mysql Datenbank für OTRS muss erstellt werden (mein Web Installer hat keine Datenbank erstellt?) >

11 a) C:\otrs\MySQL\bin>mysql -uroot
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 13
Server version: 5.1.51-community-log MySQL Community Server (GPL)

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement

mysql> 

11 b) mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| test               |
+--------------------+
3 rows in set (0.01 sec)
11 c) Datenbank anlegen
mysql> CREATE DATABASE otrs CHARACTER SET utf8;
Query OK, 1 row affected (0.00 sec)
mysql> exit
11 d) Rechte vergeben und Neustart der Dienste vermeiden
C:\otrs\MySQL\bin>mysql -uroot -e "GRANT all ON otrs.* TO 'otrs'@'localhost' IDENTIFIED BY 'deindbpasswort aus der config.pm'" && mysql -uroot -e "FLUSH PRIVILEGES"
12. mysql Datenbank importieren:
C:\otrs\MySQL\bin>mysql -uroot otrs < C:\Users\lokalAdmin\Downloads\otrs-db-dump.sql
13. mysql Datenbank Upgraden
C:\otrs\OTRS\scripts>mysql -uroot otrs < DBUpdate-to-3.3.mysql.sql
INFO: Foreign key constraint FK_standard_response_valid_id_id does not exist, skipping.
INFO: Foreign key constraint FK_standard_response_valid_id_id does not exist, skipping.
INFO: Foreign key constraint FK_standard_response_create_by_id does not exist, skipping.
INFO: Foreign key constraint FK_standard_response_create_by_id does not exist, skipping.
INFO: Foreign key constraint FK_standard_response_change_by_id does not exist, skipping.
INFO: Foreign key constraint FK_standard_response_change_by_id does not exist, skipping.
INFO: Foreign key constraint FK_queue_standard_response_standard_response_id_id does not exist, skipping.
INFO: Foreign key constraint FK_queue_standard_response_standard_response_id_id does not exist, skipping.
INFO: Foreign key constraint FK_queue_standard_response_queue_id_id does not exist, skipping.
INFO: Foreign key constraint FK_queue_standard_response_queue_id_id does not exist, skipping.
INFO: Foreign key constraint FK_queue_standard_response_create_by_id does not exist, skipping.
INFO: Foreign key constraint FK_queue_standard_response_create_by_id does not exist, skipping.
INFO: Foreign key constraint FK_queue_standard_response_change_by_id does not exist, skipping.
INFO: Foreign key constraint FK_queue_standard_response_change_by_id does not exist, skipping.
INFO: Foreign key constraint FK_standard_response_attachment_standard_response_id_id does not exist, skipping.
INFO: Foreign key constraint FK_standard_response_attachment_standard_response_id_id does not exist, skipping.
INFO: Foreign key constraint FK_standard_response_attachment_standard_attachment_id_id does not exist, skipping.
INFO: Foreign key constraint FK_standard_response_attachment_standard_attachment_id_id does not exist, skipping.
INFO: Foreign key constraint FK_standard_response_attachment_create_by_id does not exist, skipping.
INFO: Foreign key constraint FK_standard_response_attachment_create_by_id does not exist, skipping.
INFO: Foreign key constraint FK_standard_response_attachment_change_by_id does not exist, skipping.
INFO: Foreign key constraint FK_standard_response_attachment_change_by_id does not exist, skipping.
13a) Datenbank mit Perl migrieren
C:\otrs\OTRS\scripts>perl DBUpdate-to-3.3.pl

Migration started...

Step 1 of 13: Refresh configuration cache...
If you see warnings about 'Subroutine Load redefined', that's fine, no need to worry!
done.

Step 2 of 13: Check framework version... done.

Step 3 of 13: Generate MessageID md5sums... done.

Step 4 of 13: Migrate old settings... done.

Step 5 of 13: Migrate OTRSExternalTicketNumberRecognition... done.

Step 6 of 13: Checking Standard Template table columns...
Check if 'template_type' columns exists.
'template_type' column not found, create it.
ALTER TABLE standard_template ADD template_type VARCHAR (100) NULL
UPDATE standard_template SET template_type = 'Answer' WHERE template_type IS NULL
ALTER TABLE standard_template CHANGE template_type template_type VARCHAR (100) DEFAULT 'Answer' NOT NULL
done.

Step 7 of 13: Updating Queue Standard Template relations table...
Cleaning queue_standard_template table
Creating new Foreign Keys for queue_standard_template table

--- Note: ---
If you have already run this script before then the Foreign Keys are already set and you might see errors regarding 'dup
licate key' or 'constrain already exists', that's fine, no need to worry!
---

ALTER TABLE queue_standard_template ADD CONSTRAINT FK_queue_standard_template_standard_template_id_id FOREIGN KEY (stand
ard_template_id) REFERENCES standard_template (id)
ALTER TABLE queue_standard_template ADD CONSTRAINT FK_queue_standard_template_queue_id_id FOREIGN KEY (queue_id) REFEREN
CES queue (id)
ALTER TABLE queue_standard_template ADD CONSTRAINT FK_queue_standard_template_create_by_id FOREIGN KEY (create_by) REFER
ENCES users (id)
ALTER TABLE queue_standard_template ADD CONSTRAINT FK_queue_standard_template_change_by_id FOREIGN KEY (change_by) REFER
ENCES users (id)
done.

Step 8 of 13: Migrate OTRSGenericStandardTemplates... done.

Step 9 of 13: Checking if ACL tables already exist... Check if ACL table exists.
ACL tables not found, create it.
CREATE TABLE acl (
    id INTEGER NOT NULL AUTO_INCREMENT,
    name VARCHAR (200) NOT NULL,
    comments VARCHAR (250) NULL,
    description VARCHAR (250) NULL,
    valid_id SMALLINT NOT NULL,
    stop_after_match SMALLINT NULL,
    config_match LONGBLOB NULL,
    config_change LONGBLOB NULL,
    create_time DATETIME NOT NULL,
    create_by INTEGER NOT NULL,
    change_time DATETIME NOT NULL,
    change_by INTEGER NOT NULL,
    PRIMARY KEY(id),
    UNIQUE INDEX acl_name (name)
)
CREATE TABLE acl_sync (
    acl_id VARCHAR (200) NOT NULL,
    sync_state VARCHAR (30) NOT NULL,
    create_time DATETIME NOT NULL,
    change_time DATETIME NOT NULL
)
ALTER TABLE acl ADD CONSTRAINT FK_acl_create_by_id FOREIGN KEY (create_by) REFERENCES users (id)
ALTER TABLE acl ADD CONSTRAINT FK_acl_change_by_id FOREIGN KEY (change_by) REFERENCES users (id)
ALTER TABLE acl ADD CONSTRAINT FK_acl_valid_id_id FOREIGN KEY (valid_id) REFERENCES valid (id)
done.

Step 10 of 13: Uninstall Merged Feature Add-Ons... done.

Step 11 of 13: Delete the files that are not longer needed... done.

Step 12 of 13: Clean up the cache... done.

Step 13 of 13: Refresh configuration cache another time...
If you see warnings about 'Subroutine Load redefined', that's fine, no need to worry!
[Thu May  7 13:17:53 2015] DBUpdate-to-3.3.pl: Subroutine Load redefined at c:/OTRS/OTRS/Kernel/Config/Files/ZZZAAuto.pm
 line 7.
[Thu May  7 13:17:53 2015] DBUpdate-to-3.3.pl: Subroutine Load redefined at c:/OTRS/OTRS/Kernel/Config/Files/ZZZAuto.pm
line 7.
done.

Migration completed!

C:\otrs\OTRS\scripts>

Schönen Gruss

Content-ID: 271355

Url: https://administrator.de/tutorial/otrs-win-upgrade-von-3-2-8-auf-3-3-12-271355.html

Ausgedruckt am: 22.12.2024 um 07:12 Uhr