Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Think about Adapter/JS-Controller Versions and Restore procedure #2510

Open
buanet opened this issue Oct 30, 2023 · 7 comments
Open

Think about Adapter/JS-Controller Versions and Restore procedure #2510

buanet opened this issue Oct 30, 2023 · 7 comments

Comments

@buanet
Copy link
Contributor

buanet commented Oct 30, 2023

Originally from simatec/ioBroker.backitup#1010

Am Ende gute Frage und Grundsatzfrage : stellt ein Backup exakt die Versionen/zustand her wie davor oder nicht

Wenn man es so betrachtet, dann hätten wir in beiden Szenarien ein Problem...

  1. Restore stellt Zustand und Versionen zum Zeitpunkt des Backups wieder her = Ist aktuell nicht der Fall, soweit ich weiß werden nach dem Restore die Adapter aus latent installiert (???), js-controller bleibt untouched...
  2. Restore stellt ausschließlich config wieder her = Adapter werden dazu aus latest nachinstalliert, js-controller meckert wenn Version nicht dem Backup entspricht.

😀 Ich denke wir haben hier eine Aufgabe...

Mfg,
André

@foxriver76
Copy link
Collaborator

This ticket wants to achieve automatic installation of js-controller in the version from the backup.

Needs to be discussed @Apollon77, to notify about this we recently introduced the information and option to allow restoring into another version via --force flag.

Personally, I am not sure if we should do this, as potentially breaking installations

@buanet
Copy link
Contributor Author

buanet commented Oct 30, 2023

Laut @foxriver76 werden die Adapter in der Version installiert, die im Backup enthalten ist.

Aber was ist mit dem js-controller?
Man würde vermutlich erwarten, dass auch dieser beim Restore in der Version aus dem Backup installiert wird. Ist das technisch möglich und sinnvoll?

@buanet
Copy link
Contributor Author

buanet commented Oct 30, 2023

we recently introduced the information and option to allow restoring into another version via --force flag

@foxriver76 true

But look at this from another pov:

I`m a user. I managed it to get ioBroker to work with a oneliner on my Ubuntu Desktop homeserver and can fully administer it from the admin ui. I do my backups with preinstalled backitup adapter.
Now my homeserver died. I got my backup files saved on my nas and managed it to set up a new Ubuntu desktop machine with ioBroker. Now I want to restore my backupfile with the help of backitup. 😃

When trying to restore iobroker from backitup, it says js-controller mismatch, try restoring with --force flag (has to be tested if backitup reports this correctly, but i think so). What should I do (without the need of using cli)?

In my opinion we have the following options:

  1. Make --force option available in backitup adapter (is this option safe?)
  2. Give js-controller the option to downgrade it's version during restore or ignore minor version differences (technically possible? safe?)
  3. Make it possible to downgrade/ install specific version of js-controller from admin ui and alter the error message during restore (lets the user downgrade, restore without error and update afterwards using the admin ui)

Other ideas?

Please don`t get me wrong. My intent is always to make iobroker "easier" to use and administer for regular users. We have to do this if we want to make it more user friendly and get away from the "iob is for system administrators 🤓" image...

Regards,
André

@foxriver76
Copy link
Collaborator

  1. Every adapter is free to use the force, flag. It was also the behavior for past versions. Before we wanted to ensure that a backup is generally a 1 to 1 reproduction of your old system, because a controller version mismatch can have high impact.
  2. If we somehow manage to find a good way to restore the controller to a previous version, I am happy to implement it. We also have started changing controller version code-wise with the controller UI upgrade, at least on Linux systems. Currently I would not say that this is stable yet.
  3. Basically 2 is needed ^^

I think the fastest and safest solution for now would be to put an option in back it up, either by checking the error output and then showing a popup, that it will be restored with a different controller version if user likes and can confirm.

@Apollon77
Copy link
Collaborator

I would also agree that backit up should ask the user if he wants tooverride that js-controller version difference. Alternatively the user can manually downgrade js.controller (maybe infos on how to do that could be given).

If the js-controller would be versioned semantic (which he is not!) then we could think about "allowing a patch version difference", but it is not the case right now, so a patch version can also contain new fetures and so "bugs".

The most transparent way would be to handle it in backitup.

@simatec any opinion?

@simatec
Copy link

simatec commented Oct 30, 2023

I think this should be possible in Backitup Restore.
I'll take a look at the best way to include the —force flag as an option in the restore

@simatec
Copy link

simatec commented Nov 1, 2023

I would also agree that backit up should ask the user if he wants tooverride that js-controller version difference. Alternatively the user can manually downgrade js.controller (maybe infos on how to do that could be given).

If the js-controller would be versioned semantic (which he is not!) then we could think about "allowing a patch version difference", but it is not the case right now, so a patch version can also contain new fetures and so "bugs".

The most transparent way would be to handle it in backitup.

@simatec any opinion?

I took a look at the issue and realised that back in the release of js-controller 4.x we already had to act and include the --force flag.
So actually Backitup already has that on board.

https://github.com/simatec/ioBroker.backitup/blob/f96c9a7615b26f4985f110c614f2317a5a2bfd95/lib/restore/iobroker.js#L10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants