migrate only client to new OPSI

Antworten
lebourg
Beiträge: 5
Registriert: 27 Jan 2015, 16:37

migrate only client to new OPSI

Beitrag von lebourg »

Hi,

I wanted to upgrade opsi from version 4.1 to 4.2 but I encountered several problems.

So I decided to create a new server and therefore to review all my packages. My backend is in mysql and I want to import only the clients and not the packages because I want to update them.

Do you know a method to import only the hosts without the packages?

Best regards.
Benutzeravatar
fkalweit
uib-Team
Beiträge: 173
Registriert: 23 Okt 2020, 16:14

Re: migrate only client to new OPSI

Beitrag von fkalweit »

Hello,

maybe you could take a opsi-backup and restore the backup on the new server with --new-server-id <fqdn>.
Then you can delete the products you dont want.
After that execute a opsi-setup --cleanup-backend.

Make sure that your 4.1 server packages, client agent and current DB is up to date (opsi-setup --update-mysql)

Regards
Fabian
lebourg
Beiträge: 5
Registriert: 27 Jan 2015, 16:37

Re: migrate only client to new OPSI

Beitrag von lebourg »

Hello,

Thank you for your feedback. This is indeed the solution I had also found.
But, I wanted to find a solution that avoided me to uninstall the packages to reinstall them in a new version.
In this case, I will try to update the current server again and I will modify my packages as I go along.

Regards
Benutzeravatar
ThomasT
uib-Team
Beiträge: 529
Registriert: 26 Jun 2013, 12:26

Re: migrate only client to new OPSI

Beitrag von ThomasT »

You could try to extract the hostObjects of the old server via

Code: Alles auswählen

opsi-admin -d method host_getObjects '' '{"type":"OpsiClient"}' > hostobjects.json
Copy the hostobjects.json to your new server and import the Clients via

Code: Alles auswählen

opsi-admin -d method host_createObjects < hostobjects.json
Kein Support per DM!
_________________________
opsi support - https://www.uib.de/
For productive opsi installations we recommend support contracts.
Antworten