Fehlende DB Einträge opsi-convert file mysql

Antworten
LKretschmer
Beiträge: 6
Registriert: 27 Jul 2022, 11:30

Fehlende DB Einträge opsi-convert file mysql

Beitrag von LKretschmer »

Liebes UIB Team,

Im Zuge des Upgrades von OPSI 4.2 auf 4.3 möchte ich mein Backend zunächst von File auf MySQL umstellen. Wenn ich es richtig verstanden habe sollte dies eigentlich beim Upgrade auf 4.3 von alleine gesehen, aber dies hat bei mir zum Verlust sämtlicher Backendaten geführt.
Aus diesem Grund habe ich mich dafür entschieden das Backend zunächst selbst auf MySQL zu stellen.
Leider fehlen dann auch weite Teile der zu konvertierenden Daten. In der DB sind beispielsweise Einträge in der HOST-Tabelle, aber nicht der für die Product Property.

Ich bin bei der Umstellung wie folgt vorgegangen:
1.

Code: Alles auswählen

opsi-setup --configure-mysql
2. Ändern der Backend Dispatch: /etc/opsi/backendManager/dispatch.conf

Code: Alles auswählen

       backend_.*         : mysql, opsipxeconfd
       host_.*            : mysql, opsipxeconfd
       productOnClient_.* : mysql, opsipxeconfd
       configState_.*     : mysql, opsipxeconfd
       softwareLicense.*  : mysql
       audit.*            : mysql
       .*                 : mysql
3.

Code: Alles auswählen

opsi-setup --init-current-config
opsi-set-rights
systemctl restart opsiconfd.service
systemctl restart opsipxeconfd.service
4.

Code: Alles auswählen

opsi-convert file mysql


Beim 4. Schritt siehts auch so aus als würden alle Backenddaten migriert. (bspw. Replicating ProductProperty : 100.00% [============================] 3245/3245)
Dennoch befinden sich keine Daten in der zugehörigen Tabelle der MySQL DB.

Über Hilfe würde ich mich sehr freuen.

Mit freundlichen Grüßen
Lukas Kretschemr
Benutzeravatar
SisterOfMercy
Beiträge: 1556
Registriert: 22 Jun 2012, 19:18

Re: Fehlende DB Einträge opsi-convert file mysql

Beitrag von SisterOfMercy »

Is this following the manual? I can only guess that you shouldn't have edited dispatch.conf before conversion.
Bitte schreiben Sie Deutsch, when I'm responding in the German-speaking part of the forum!
LKretschmer
Beiträge: 6
Registriert: 27 Jul 2022, 11:30

Re: Fehlende DB Einträge opsi-convert file mysql

Beitrag von LKretschmer »

Hello!

Yes I was following the OPSI 4.2 manual Datastorage/Backends (https://docs.opsi.org/opsi-docs-en/4.2/ ... itializing) to convert the backend to mysql. There were no Errors showing during the Process. Everthing looked fine unitl I checked the Database for the the missing Metadata like Product Property and others.
The Output from the MySQL DB is showing the correkt number of HOSTs for example but no PRODUCT_PROPERTY:

Code: Alles auswählen

mysql> SELECT COUNT(*) FROM HOST;
+----------+
| COUNT(*) |
+----------+
|      282 |
+----------+
1 row in set (0,01 sec)

mysql> SELECT COUNT(*) FROM PRODUCT_PROPERTY;
+----------+
| COUNT(*) |
+----------+
|        0 |
+----------+
1 row in set (0,00 sec)
If you have any idea what I am missing, I would be really thankful. This issue keeps me from migrating to OPSI 4.3 for a while now.

Best regards
Lukas
LKretschmer
Beiträge: 6
Registriert: 27 Jul 2022, 11:30

Re: Fehlende DB Einträge opsi-convert file mysql

Beitrag von LKretschmer »

One more Question: I have read your awnser over again and are you suggesting to change up the order of the manual and the one I gave in my first message to do the order by step 1, 4, 2, 3 instead?
Benutzeravatar
fkalweit
uib-Team
Beiträge: 212
Registriert: 23 Okt 2020, 16:14

Re: Fehlende DB Einträge opsi-convert file mysql

Beitrag von fkalweit »

Hallo,

The update from 4.2 to 4.3 should perform the migration automatically and this is also the better way. It is important that the file backend is still configured in the dispatch. If this does not work, we can also take a look at the 4.2 backend.

Here again the link to the 4.3 documentation: https://docs.opsi.org/opsi-docs-en/4.3/ ... grade.html

Viele Grüße
Fabian


Vielen Dank für die Nutzung von opsi. Im Forum ist unser Support begrenzt.

Für den professionellen Einsatz und individuelle Beratung empfehlen wir einen Support-Vertrag und eine Schulung.
Gerne informieren wir Sie zu unserem Angebot.

uib GmbH
Telefon: +49 6131 27561 0
E-Mail: sales@uib.de


LKretschmer
Beiträge: 6
Registriert: 27 Jul 2022, 11:30

Re: Fehlende DB Einträge opsi-convert file mysql

Beitrag von LKretschmer »

Hello,

I managed to create a full backup the offical way you suggested. But not on the orginal 4.2 Opsi Server.
The steps I took are the following:

1. I created a backup of the file backend of my 4.2 Opsi Server
2. I created a Ubuntu 22.04 VM and made a fresh Opsi 4.2 Installation
3. I restored the backup of the file backend of the old server
4, I upgrade the server successfully to 4.3 following the documentation
5. I then created a 4.3 backup for the new Server running on Docker

Thank you guys very much for your help!
Best regards
Lukas
Antworten