Seite 1 von 1

migrate only client to new OPSI

Verfasst: 09 Feb 2022, 11:10
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.

Re: migrate only client to new OPSI

Verfasst: 09 Feb 2022, 14:23
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

Re: migrate only client to new OPSI

Verfasst: 10 Feb 2022, 09:41
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

Re: migrate only client to new OPSI

Verfasst: 10 Feb 2022, 16:42
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