Howto restore a configuration on a new server ?

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

Howto restore a configuration on a new server ?

Beitragvon bourhis » 02 Nov 2020, 10:21

Hi,

after a crash I have to rebuild a new server for "opsi".
When it's done I try to restore my configuration with this command :

Code: Alles auswählen

opsi-backup restore --configuration --backends=mysql bropsi.201027.tar.bz2

but I obtain this message :
"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."

How can I restore my backup ?

Best regards.

Benutzeravatar
SisterOfMercy
Beiträge: 1181
Registriert: 22 Jun 2012, 19:18

Re: Howto restore a configuration on a new server ?

Beitragvon SisterOfMercy » 02 Nov 2020, 19:45

snippet from opsi-backup --help:

Code: Alles auswählen

   restore    <backup-archive>         Restore data from <backup-archive>.
      --backends    <backend>          Select a backend to restore or 'all' for all backends.
                                          Can be given multiple times.
      --configuration                  Restore opsi configuration.
      -f, --force                      Ignore sanity checks and try to apply anyways. Use with caution!


So I'd guess you would want to use the --force parameter?
Bitte schreiben Sie Deutsch, when I'm responding in the German-speaking part of the forum!

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

Re: Howto restore a configuration on a new server ?

Beitragvon bourhis » 04 Nov 2020, 11:43

Hi,

I think that I have found the problem : when I have restored my configuration, the file /etc/opsi/opsiconfd.pem whas replaced...

So I had to regenerate it :

Code: Alles auswählen

openssl req -new -x509 -days 10000 -nodes -out opsiconfd.pem -keyout opsiconfd.pem


Now it seem's working but I can't access to "opsi-configed" on linux (that's work on Windows) !
The error message is :
"No connexion / javax.net.ssl.SSLHandshakeException: Received fatal alert: protocol_version"

I tried to reinstall "configed" with no more success.

Any idea ?

Best regards.

Benutzeravatar
SisterOfMercy
Beiträge: 1181
Registriert: 22 Jun 2012, 19:18

Re: Howto restore a configuration on a new server ?

Beitragvon SisterOfMercy » 04 Nov 2020, 20:33

I would try to run opsi-setup --init-current-config after importing your configuration.

Configed might still not work, you may need to change some product properties, like fallback_tlsv1. It depends on your setup, and there are other topics where advice is given about connection problems with configed.
Bitte schreiben Sie Deutsch, when I'm responding in the German-speaking part of the forum!