[Solved] How to migrate a server ?

Antworten
bourhis
Beiträge: 112
Registriert: 07 Nov 2012, 15:57

[Solved] How to migrate a server ?

Beitrag von bourhis »

Hi,

I want to migrate my old opsi server (on Ubuntu 12.04), to a new one (on Ubuntu 14.04).
I try to do that :
- I make a backup with "opsi-backup"
- I stop the old server
- I build the new one with the same name and IP adress
- I try to restore my "backup" : but that's don't work ! So I restore all the files "manually" (clients, clientsgroups, pckeys, ...)

My clients can connect to the new server but if I try to do something (install a new software, ...) I receive an error message.

What is the good method to do this migration ?

Best regards.
Zuletzt geändert von bourhis am 16 Mär 2016, 10:09, insgesamt 1-mal geändert.
Benutzeravatar
n.wenselowski
Ex-uib-Team
Beiträge: 3194
Registriert: 04 Apr 2013, 12:15

Re: How to migrate a server ?

Beitrag von n.wenselowski »

Hi,
bourhis hat geschrieben:- I try to restore my "backup" : but that's don't work !
What exactly did not work?
What did you do for restoring?


-N

Code: Alles auswählen

import OPSI
bourhis
Beiträge: 112
Registriert: 07 Nov 2012, 15:57

Re: How to migrate a server ?

Beitrag von bourhis »

Hi,

I try this command :

Code: Alles auswählen

opsi-backup restore iutopsi_4.0.6.34_2016-03-12_08-46-10.001682.tar
I obtain this message :

Code: Alles auswählen

WARNING: Your system config is different from the one recorded with this backup.
This means the backup was probably taken for another machine and restoring it might leave this opsi installation unusable.
Do you wish to continue? [y/n]
If I said "y" (yes) nothing appends !

So I try to copy all the files in iutopsi_4.0.6.34_2016-03-12_08-46-10.001682.tar at their original emplacement and I reboot the server.
Everything seem OK : I got the "configed" interface with my client in the good groups ; if I boot a client there is no error when the "opsi-client" start !

But when I try to make, for example, a sofware installation, the opsi-client return an error (something about a wrong permission).

Regards.
Benutzeravatar
wolfbardo
uib-Team
Beiträge: 1354
Registriert: 01 Jul 2008, 12:10

Re: How to migrate a server ?

Beitrag von wolfbardo »

bourhis hat geschrieben:Hi,

I try this command :

Code: Alles auswählen

opsi-backup restore iutopsi_4.0.6.34_2016-03-12_08-46-10.001682.tar
ok, this will not work and the docs may be misleading here.

For the restore you have to give more options, for instance

Code: Alles auswählen

opsi-backup restore --configuration --backends=all opsi_backup.tar.bz2
or

Code: Alles auswählen

opsi-backup restore --configuration --backends=file --backends=mysq opsi_backup.tar.bz2
regards,
Bardo Wolf


OPSICONF 2024
https://opsi.org/en/opsiconf/

Basisworkshop Mainz :

17. - 20. 06. 2024


opsi support - uib gmbh
For productive opsi installations we recommend maintainance + support contracts which are the base of opsi development.

http://www.uib.de
bourhis
Beiträge: 112
Registriert: 07 Nov 2012, 15:57

Re: [Solved] How to migrate a server ?

Beitrag von bourhis »

Hi,

this option works :

Code: Alles auswählen

opsi-backup restore --configuration --backends=mysql opsi_backup.tar.bz2
Thanks !
Benutzeravatar
n.wenselowski
Ex-uib-Team
Beiträge: 3194
Registriert: 04 Apr 2013, 12:15

Re: [Solved] How to migrate a server ?

Beitrag von n.wenselowski »

Hi,

FYI: future versions of opsi-backup will now warn if there is no backend given on restore.
This still may be a valid case but hopefully this solution will let less people fall into this.


Kind regards

Niko

Code: Alles auswählen

import OPSI
Antworten