ioBroker.js-controller
ioBroker.js-controller copied to clipboard
Think about Adapter/JS-Controller Versions and Restore procedure
Originally from https://github.com/simatec/ioBroker.backitup/issues/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...
- 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...
- 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é
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
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?
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:
- Make
--forceoption available in backitup adapter (is this option safe?) - Give js-controller the option to downgrade it's version during restore or ignore minor version differences (technically possible? safe?)
- 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é
- 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. - 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.
- 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.
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 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
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