OPSI von File Backend auf MySQL Backend migrieren

islam
Beiträge: 85
Registriert: 19 Okt 2011, 12:08

OPSI von File Backend auf MySQL Backend migrieren

Beitragvon islam » 11 Jul 2018, 15:10

Hallo, wir würden gerne von OPSI File Backend auf MySQL Backend migrieren und das WAN-Modul kaufen.
Wie kann ich die MySQL-Backend aktivieren und bestehende Konfiguration migrieren?
Danke und Grüße

andré
Beiträge: 257
Registriert: 07 Jan 2014, 10:48

Re: OPSI von File Backend auf MySQL Backend migrieren

Beitragvon andré » 11 Jul 2018, 16:11

Steht im Handbuch:

https://download.uib.de/opsi4.1/documen ... l-backends

Stichwort ist das opsi-Tool opsi-convert. Findest du im Kapitel Konvertierung zwischen Backends.

islam
Beiträge: 85
Registriert: 19 Okt 2011, 12:08

Re: OPSI von File Backend auf MySQL Backend migrieren

Beitragvon islam » 18 Jul 2018, 14:52

Danke, ich bin bei folgendem Schritt in der Anleitung gescheitert:

Code: Alles auswählen

opsi-setup --init-current-config


Code: Alles auswählen

[3] [Jul 18 14:51:23] Disabling mysql backend and license management module: modules file invalid (MySQL.py|536)
[5] [Jul 18 14:51:23] Creating opsi base (SQL.py|488)
[5] [Jul 18 14:51:24] Try to find a Configserver. (InitializeBackend.py|69)
[5] [Jul 18 14:51:24] Creating config server 'opsi.domain' (InitializeBackend.py|74)
[2] [Jul 18 14:51:25] Traceback: (Logger.py|798)
[2] [Jul 18 14:51:25]   File "/usr/bin/opsi-setup", line 1242, in <module>
    main()
 (Logger.py|798)
[2] [Jul 18 14:51:25]   File "/usr/bin/opsi-setup", line 1198, in main
    initializeBackends(ipAddress)
 (Logger.py|798)
[2] [Jul 18 14:51:25]   File "/usr/lib/python2.7/dist-packages/OPSI/Util/Task/InitializeBackend.py", line 76, in initializeBackends
    backend.host_createOpsiConfigserver(**serverConfig)
 (Logger.py|798)
[2] [Jul 18 14:51:25]   File "<string>", line 1, in host_createOpsiConfigserver
 (Logger.py|798)
[2] [Jul 18 14:51:25]   File "/usr/lib/python2.7/dist-packages/OPSI/Backend/Backend.py", line 510, in _executeMethod
    return meth(**kwargs)
 (Logger.py|798)
[2] [Jul 18 14:51:25]   File "<string>", line 1, in host_createOpsiConfigserver
 (Logger.py|798)
[2] [Jul 18 14:51:25]   File "/usr/lib/python2.7/dist-packages/OPSI/Backend/Backend.py", line 510, in _executeMethod
    return meth(**kwargs)
 (Logger.py|798)
[2] [Jul 18 14:51:25]   File "/usr/lib/python2.7/dist-packages/OPSI/Backend/Backend.py", line 2381, in host_createOpsiConfigserver
    return self.host_createObjects(OpsiConfigserver.fromHash(hash))
 (Logger.py|798)
[2] [Jul 18 14:51:25]   File "/usr/lib/python2.7/dist-packages/OPSI/Backend/Backend.py", line 2056, in host_createObjects
    self._backend.host_insertObject(host)
 (Logger.py|798)
[2] [Jul 18 14:51:25]   File "<string>", line 1, in host_insertObject
 (Logger.py|798)
[2] [Jul 18 14:51:25]   File "/usr/lib/python2.7/dist-packages/OPSI/Backend/BackendManager.py", line 417, in _dispatchMethod
    res = meth(**kwargs)
 (Logger.py|798)
[2] [Jul 18 14:51:25]   File "/usr/lib/python2.7/dist-packages/OPSI/Backend/SQL.py", line 1054, in host_insertObject
    self._sql.insert('HOST', data)
 (Logger.py|798)
[2] [Jul 18 14:51:25]   File "/usr/lib/python2.7/dist-packages/OPSI/Backend/MySQL.py", line 384, in insert
    self.execute(query, conn, cursor)
 (Logger.py|798)
[2] [Jul 18 14:51:25]   File "/usr/lib/python2.7/dist-packages/OPSI/Backend/MySQL.py", line 484, in execute
    res = cursor.execute(query)
 (Logger.py|798)
[2] [Jul 18 14:51:25]   File "/usr/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 174, in execute
    self.errorhandler(self, exc, value)
 (Logger.py|798)
[2] [Jul 18 14:51:25]   File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
    raise errorclass, errorvalue
 (Logger.py|798)
[2] [Jul 18 14:51:25]      ==>>> (1054, "Unknown column 'workbenchLocalUrl' in 'field list'") (opsi-setup|1246)

ERROR: (1054, "Unknown column 'workbenchLocalUrl' in 'field list'")

islam
Beiträge: 85
Registriert: 19 Okt 2011, 12:08

Re: OPSI von File Backend auf MySQL Backend migrieren

Beitragvon islam » 18 Jul 2018, 15:36

Jetzt kommt folgende Fehlermeldung:

Code: Alles auswählen

0 root@opsi:~# opsi-setup --init-current-config
[3] [Jul 18 15:34:20] Disabling mysql backend and license management module: modules file invalid (MySQL.py|536)
[5] [Jul 18 15:34:21] Creating opsi base (SQL.py|488)
[5] [Jul 18 15:34:22] Try to find a Configserver. (InitializeBackend.py|69)
[5] [Jul 18 15:34:22] Setting up default values. (ConfigurationData.py|81)
[2] [Jul 18 15:34:22] Traceback: (Logger.py|798)
[2] [Jul 18 15:34:22]   File "/usr/bin/opsi-setup", line 1242, in <module>
    main()
 (Logger.py|798)
[2] [Jul 18 15:34:22]   File "/usr/bin/opsi-setup", line 1198, in main
    initializeBackends(ipAddress)
 (Logger.py|798)
[2] [Jul 18 15:34:22]   File "/usr/lib/python2.7/dist-packages/OPSI/Util/Task/InitializeBackend.py", line 110, in initializeBackends
    initializeConfigs(backend=backend, configServer=configServer)
 (Logger.py|798)
[2] [Jul 18 15:34:22]   File "/usr/lib/python2.7/dist-packages/OPSI/Util/Task/ConfigureBackend/ConfigurationData.py", line 82, in initializeConfigs
    backend.config_createObjects(getDefaultConfigs(backend, configServer, pathToSMBConf))  # pylint: disable=maybe-no-member
 (Logger.py|798)
[2] [Jul 18 15:34:22]   File "<string>", line 1, in config_createObjects
 (Logger.py|798)
[2] [Jul 18 15:34:22]   File "/usr/lib/python2.7/dist-packages/OPSI/Backend/Backend.py", line 510, in _executeMethod
    return meth(**kwargs)
 (Logger.py|798)
[2] [Jul 18 15:34:22]   File "<string>", line 1, in config_createObjects
 (Logger.py|798)
[2] [Jul 18 15:34:22]   File "/usr/lib/python2.7/dist-packages/OPSI/Backend/Backend.py", line 510, in _executeMethod
    return meth(**kwargs)
 (Logger.py|798)
[2] [Jul 18 15:34:22]   File "/usr/lib/python2.7/dist-packages/OPSI/Backend/Backend.py", line 2392, in config_createObjects
    forcedConfigs = forceObjectClassList(configs, Config)
 (Logger.py|798)
[2] [Jul 18 15:34:22]   File "/usr/lib/python2.7/dist-packages/OPSI/Types.py", line 559, in forceObjectClassList
    return [forceObjectClass(element, objectClass) for element in forceList(var)]
 (Logger.py|798)
[2] [Jul 18 15:34:22]   File "/usr/lib/python2.7/dist-packages/OPSI/Types.py", line 112, in forceList
    return list(var)
 (Logger.py|798)
[2] [Jul 18 15:34:22]   File "/usr/lib/python2.7/dist-packages/OPSI/Util/Task/ConfigureBackend/ConfigurationData.py", line 95, in getDefaultConfigs
    configIdents = set(backend.config_getIdents(returnType='unicode'))  # pylint: disable=maybe-no-member
 (Logger.py|798)
[2] [Jul 18 15:34:22]   File "<string>", line 1, in config_getIdents
 (Logger.py|798)
[2] [Jul 18 15:34:22]   File "/usr/lib/python2.7/dist-packages/OPSI/Backend/Backend.py", line 510, in _executeMethod
    return meth(**kwargs)
 (Logger.py|798)
[2] [Jul 18 15:34:22]   File "<string>", line 1, in config_getIdents
 (Logger.py|798)
[2] [Jul 18 15:34:22]   File "/usr/lib/python2.7/dist-packages/OPSI/Backend/Backend.py", line 510, in _executeMethod
    return meth(**kwargs)
 (Logger.py|798)
[2] [Jul 18 15:34:22]   File "/usr/lib/python2.7/dist-packages/OPSI/Backend/Backend.py", line 1922, in config_getIdents
    return [config.getIdent(returnType) for config in self.config_getObjects(attributes=['id'], **filter)]
 (Logger.py|798)
[2] [Jul 18 15:34:22]   File "<string>", line 1, in config_getObjects
 (Logger.py|798)
[2] [Jul 18 15:34:22]   File "/usr/lib/python2.7/dist-packages/OPSI/Backend/Backend.py", line 510, in _executeMethod
    return meth(**kwargs)
 (Logger.py|798)
[2] [Jul 18 15:34:22]   File "<string>", line 1, in config_getObjects
 (Logger.py|798)
[2] [Jul 18 15:34:22]   File "/usr/lib/python2.7/dist-packages/OPSI/Backend/BackendManager.py", line 417, in _dispatchMethod
    res = meth(**kwargs)
 (Logger.py|798)
[2] [Jul 18 15:34:22]   File "/usr/lib/python2.7/dist-packages/OPSI/Backend/SQL.py", line 1145, in config_getObjects
    self._requiresEnabledSQLBackendModule()
 (Logger.py|798)
[2] [Jul 18 15:34:22]   File "/usr/lib/python2.7/dist-packages/OPSI/Backend/SQL.py", line 256, in _requiresEnabledSQLBackendModule
    raise BackendModuleDisabledError(u"SQL backend module disabled")
 (Logger.py|798)
[2] [Jul 18 15:34:22]      ==>>> Backend module disabled error: SQL backend module disabled (opsi-setup|1246)

ERROR: Backend module disabled error: SQL backend module disabled

SirTux
Beiträge: 242
Registriert: 05 Feb 2011, 18:37

Re: OPSI von File Backend auf MySQL Backend migrieren

Beitragvon SirTux » 18 Jul 2018, 16:22

Code: Alles auswählen

Disabling mysql backend and license management module: modules file invalid (MySQL.py|536)


Dann solltest du mal ürberprüfen, ob du eine Freischaltung hast und diese korrekt hinterlegt hast.

Benutzeravatar
n.wenselowski
Beiträge: 2886
Registriert: 04 Apr 2013, 12:15

Re: OPSI von File Backend auf MySQL Backend migrieren

Beitragvon n.wenselowski » 24 Jul 2018, 10:17

Hi,

islam hat geschrieben:Danke, ich bin bei folgendem Schritt in der Anleitung gescheitert:

Code: Alles auswählen

opsi-setup --init-current-config


Code: Alles auswählen

[3] [Jul 18 14:51:23] Disabling mysql backend and license management module: modules file invalid (MySQL.py|536)
[5] [Jul 18 14:51:23] Creating opsi base (SQL.py|488)
[5] [Jul 18 14:51:24] Try to find a Configserver. (InitializeBackend.py|69)
[5] [Jul 18 14:51:24] Creating config server 'opsi.domain' (InitializeBackend.py|74)
[2] [Jul 18 14:51:25] Traceback: (Logger.py|798)
[2] [Jul 18 14:51:25]   File "/usr/bin/opsi-setup", line 1242, in <module>
    main()
 (Logger.py|798)
[2] [Jul 18 14:51:25]   File "/usr/bin/opsi-setup", line 1198, in main
    initializeBackends(ipAddress)
 (Logger.py|798)
[2] [Jul 18 14:51:25]   File "/usr/lib/python2.7/dist-packages/OPSI/Util/Task/InitializeBackend.py", line 76, in initializeBackends
    backend.host_createOpsiConfigserver(**serverConfig)
 (Logger.py|798)
[2] [Jul 18 14:51:25]   File "<string>", line 1, in host_createOpsiConfigserver
 (Logger.py|798)
[2] [Jul 18 14:51:25]   File "/usr/lib/python2.7/dist-packages/OPSI/Backend/Backend.py", line 510, in _executeMethod
    return meth(**kwargs)
 (Logger.py|798)
[2] [Jul 18 14:51:25]   File "<string>", line 1, in host_createOpsiConfigserver
 (Logger.py|798)
[2] [Jul 18 14:51:25]   File "/usr/lib/python2.7/dist-packages/OPSI/Backend/Backend.py", line 510, in _executeMethod
    return meth(**kwargs)
 (Logger.py|798)
[2] [Jul 18 14:51:25]   File "/usr/lib/python2.7/dist-packages/OPSI/Backend/Backend.py", line 2381, in host_createOpsiConfigserver
    return self.host_createObjects(OpsiConfigserver.fromHash(hash))
 (Logger.py|798)
[2] [Jul 18 14:51:25]   File "/usr/lib/python2.7/dist-packages/OPSI/Backend/Backend.py", line 2056, in host_createObjects
    self._backend.host_insertObject(host)
 (Logger.py|798)
[2] [Jul 18 14:51:25]   File "<string>", line 1, in host_insertObject
 (Logger.py|798)
[2] [Jul 18 14:51:25]   File "/usr/lib/python2.7/dist-packages/OPSI/Backend/BackendManager.py", line 417, in _dispatchMethod
    res = meth(**kwargs)
 (Logger.py|798)
[2] [Jul 18 14:51:25]   File "/usr/lib/python2.7/dist-packages/OPSI/Backend/SQL.py", line 1054, in host_insertObject
    self._sql.insert('HOST', data)
 (Logger.py|798)
[2] [Jul 18 14:51:25]   File "/usr/lib/python2.7/dist-packages/OPSI/Backend/MySQL.py", line 384, in insert
    self.execute(query, conn, cursor)
 (Logger.py|798)
[2] [Jul 18 14:51:25]   File "/usr/lib/python2.7/dist-packages/OPSI/Backend/MySQL.py", line 484, in execute
    res = cursor.execute(query)
 (Logger.py|798)
[2] [Jul 18 14:51:25]   File "/usr/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 174, in execute
    self.errorhandler(self, exc, value)
 (Logger.py|798)
[2] [Jul 18 14:51:25]   File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
    raise errorclass, errorvalue
 (Logger.py|798)
[2] [Jul 18 14:51:25]      ==>>> (1054, "Unknown column 'workbenchLocalUrl' in 'field list'") (opsi-setup|1246)

ERROR: (1054, "Unknown column 'workbenchLocalUrl' in 'field list'")


Bei dieser Meldung sollte ein opsi-setup --update-mysql helfen.


Gruß

Niko
Kein Support per DM!
_________________________
opsi support - uib gmbh
For productive opsi installations we recommend support contracts.