CloneDB-Fehlermeldung

Hilfe zu Znuny Problemen aller Art
Locked
beastmoar
Znuny expert
Posts: 163
Joined: 02 Jul 2008, 08:37

CloneDB-Fehlermeldung

Post by beastmoar »

Hallo zusammen,

ich hänge bem CloneDB von 3.3.11 auf Windows auf 3.3.11 Appliance.

Beim Testsystem mit Datenstand von vor einem Monat ca. klappt es, beim produktiven bricht er kurz vor Schluss ab:

[2015-01-15 11:40:33] Converting table virtual_fs...
[2015-01-15 11:40:33] Finished converting table virtual_fs.
[2015-01-15 11:40:33] Converting table virtual_fs_db...
[2015-01-15 11:40:33] Finished converting table virtual_fs_db.
[2015-01-15 11:40:33] Converting table virtual_fs_preferences...
[2015-01-15 11:40:33] Finished converting table virtual_fs_preferences.
[2015-01-15 11:40:33] Converting table web_upload_cache...
[2015-01-15 11:40:33] Finished converting table web_upload_cache.
[2015-01-15 11:40:33] Converting table xml_storage...
Inserting 1000 of 1046
[2015-01-15 11:40:35] Finished converting table xml_storage.
[2015-01-15 11:40:35] Creating structures in target database (phase 2/2)........
........................................................................[Thu Jan
15 11:40:35 2015] otrs.CloneDB.pl: DBD::Pg::db do failed: FEHLER: Einfügen od
er Aktualisieren in Tabelle »ticket_history« verletzt Fremdschlüssel-Constrai
nt »fk_ticket_history_article_id_id«
[Thu Jan 15 11:40:35 2015] otrs.CloneDB.pl: DETAIL: Schlüssel (article_id)=(14
816) ist nicht in Tabelle »article« vorhanden. at C:/otrs/OTRS/Kernel/System/D
B.pm line 495.
ERROR: OTRS-otrs.CloneDB.pl-10 Perl: 5.16.3 OS: MSWin32 Time: Thu Jan 15 11:40:3
5 2015

Message: FEHLER: Einfügen oder Aktualisieren in Tabelle »ticket_history« ve
rletzt Fremdschlüssel-Constraint »fk_ticket_history_article_id_id«
DETAIL: Schlüssel (article_id)=(14816) ist nicht in Tabelle »article« vorhan
den., SQL: 'ALTER TABLE ticket_history ADD CONSTRAINT FK_ticket_history_article_
id_id FOREIGN KEY (article_id) REFERENCES article (id)'

Traceback (2228):
Module: Kernel::System::CloneDB::Backend::PopulateTargetStructuresPost (OTRS
3.3.11) Line: 447
Module: otrs.CloneDB.pl (unknown version) Line: 99

.[Thu Jan 15 11:40:35 2015] otrs.CloneDB.pl: ERROR: Could not generate structure
s in target database!

C:\otrs\OTRS\bin>

Was bedeutet das?

Grüße Aelx
Rooobaaat
Znuny wizard
Posts: 432
Joined: 11 Sep 2014, 16:28
Znuny Version: OTRS 5.0.x

Re: CloneDB-Fehlermeldung

Post by Rooobaaat »

ich wette mit dir, dass du die Zieldatenbank NICHT vorher gelöscht hast... Sonst wären da keine Constraints drin
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
beastmoar
Znuny expert
Posts: 163
Joined: 02 Jul 2008, 08:37

Re: CloneDB-Fehlermeldung

Post by beastmoar »

Hi,

doch 2x nach Anleitung:
Drop the existing otrs database:
shell> dropdb otrs

Create a new otrs database for the otrs user:
shell> createdb --owner=otrs --encoding=utf8 otrs

Wie gesagt beim einen System gehts beim anderen nicht :-(
Das produktive habe ich heute erst von 3.3.8 auf 3.3.11 hochgezogen, muss ich da danach evtl. erst noch was anpassen?

Noch eine Idee?

Grüße
Alex
Rooobaaat
Znuny wizard
Posts: 432
Joined: 11 Sep 2014, 16:28
Znuny Version: OTRS 5.0.x

Re: CloneDB-Fehlermeldung

Post by Rooobaaat »

schau mal hier http://www.postgresql.org/docs/9.2/stat ... ropdb.html

Ich kenne ich mich mit PostgreSQL auch nicht so gut aus, aber ich glaube drop database funktioniert auch in PostgreSQL :)
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
beastmoar
Znuny expert
Posts: 163
Joined: 02 Jul 2008, 08:37

Re: CloneDB-Fehlermeldung

Post by beastmoar »

Ja sonst würde es nicht in der Anleitung stehen :-)
http://otrs.github.io/doc/manual/admin/ ... -appliance
Rooobaaat
Znuny wizard
Posts: 432
Joined: 11 Sep 2014, 16:28
Znuny Version: OTRS 5.0.x

Re: CloneDB-Fehlermeldung

Post by Rooobaaat »

in der Anleitung steht dropdb otrs und NICHT drop database otrs
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
beastmoar
Znuny expert
Posts: 163
Joined: 02 Jul 2008, 08:37

Re: CloneDB-Fehlermeldung

Post by beastmoar »

ja das hab ich in meinem Post oben auch geschrieben :-)
Harty
Znuny newbie
Posts: 21
Joined: 11 Apr 2013, 12:25
Znuny Version: 4.0.8

Re: CloneDB-Fehlermeldung

Post by Harty »

Hallo! Habe exakt das gleiche Problem wie beastmoar und komme auch nicht richtig weiter. cloneDB -n läuft fehlerfrei durch, -r dann nicht mehr. Der ArticleStorage steht noch auf DB. Müssen die Sachen zwingend zuvor ins Filesystem verschoben werden, oder bin ich an der Stelle schon drüber hinweg, wenn Phase 1 durchgelaufen ist? viewtopic.php?f=62&t=27601#p112273
OTRSCloneDB 1.0.11
OTRS: 4.0.8
OS: OTRS Appliance
DB: PostgreSQL
Harty
Znuny newbie
Posts: 21
Joined: 11 Apr 2013, 12:25
Znuny Version: 4.0.8

Re: CloneDB-Fehlermeldung

Post by Harty »

Nach der Verlagerung des ArtikelStorage in das Filesystem lief das DBCloning durch. Allerdings hatte ich beim Wechsel des ArticleStorage einen Fehler aufgrund eines Anhangs mit zu langem Dateinamen. Nach entfernen des betroffenen Tickets lief der StorageSwitch durch. Als das gefixt war lief auch das DBClone durch. Ob der Fehler beim DBClone ursächlich am zulangen Dateinamen des Anhangs lag, kann ich allerdings nicht sagen.
OTRS: 4.0.8
OS: OTRS Appliance
DB: PostgreSQL
Locked