-
-
Notifications
You must be signed in to change notification settings - Fork 239
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
Create & Restore Configuration via UI #269
Comments
Before features can be added to the UI an HTTP API needs to be exposed, regarding backup/restore it first needs a decision about whether it's a openHAB core feature (probably not unless @openhab/core-maintainers are on board) or an OS distribution feature (i.e. openHABian). I have no objections to having an "openHABian" section for operations like this (installing/uninstalling software, backups, system monitoring & configuration, log viewing etc.) to be performed from the UI if a properly defined & secured API is provided, since openHABian is an official part of the openHAB ecosystem. |
I have no objection to that UI section either but openHABian does not provide any API and I see no point in adding one for this purpose. There's a menu option but it in turn only calls the openhab-cli script and that in turn only calls platform specific OH scripts as @BClark09 explained in the thread. The :rolleyes: linked thread IMHO is just because some people want to ignore the complexity involved (so they don't even start reading into Amanda docs). So thanks for staying with facts rather than emotions here. Then again, just like within the thread, this request is exposing some lack of proper understanding how things are related and how they are packaged: |
@mstormi But definitely if the UI contains a create / restore configuration menu it must be stated that this only covers the openHAB related configuration and nothing more. From my understanding this feature should be provided by openHAB-core. I think calling the existing scripts from the UI will cause more troubles since somewhere it must be detected on which OS openHAB is running and then select the correct scripts, ensure that the commands can be also executed (managing of user rights, ...). |
But not enough of it, sorry. Again: Grafana is NOT part of openHAB. The core is unaware that it exists or if it is installed or where. openHAB runs on platforms Grafana is not even available for.
Another misunderstanding. |
Thanks for clarification and your patience to explain it. I do have misunderstood the architecture.
Exactly this or something similar would be a good solution in my opinion. |
Again, if the wish here is to have a web-based version of openhabian-config, which deal more with the underlying OS than openHAB proper (including, why not, backuping/snapshotting important files from third-party tools): remember that launching other UIs by clicking tiles on the main UI - like OH2's dashboard - is still offered, and openHABian can provide that additional UI and a tile for it, as it does with frontail and others. Rather than adding a section in OH3's UI (what I suggested above), I think it would be an even better idea. Also, there are things that are difficult to do while openHAB is running, like restoring its configuration or upgrading it, but an openHABian-specific web app running separately on a different port could. |
Stay focus on the goal please - To backup openHAB configuration in an easy way. Dont mix this with any 3.party services (at least not yet), otherweise this suggestion will fail into a debate about 3.party services beeing an issue..
Not quite true. The point of the thread beeing refered to, was actually the exact opposite - Having a fully descriped backup solution (even though its limited to openHAB configuration only), without beeing too complexed for new/non-knowlegded users. |
I agree with the main goal to backup only openHAB configuration. I suggest that after the backup a message is shown to the user, how many things, items, scripts ... have been included in the backup. This gives the user an indication if the correct configuration has been saved. |
Most switches/routers/wifi access points allow you to take a backup of its configuration, save it on your computer, do a factory reset, or heck, throw it in the bin, and buy a new one, restore that "Backup" and you now have the same running version of the device like before. That's the kind of backup I think openHAB could use and should have as a part of the web ui (and supported by core, of course). We're not talking about daily/weekly/monthly backup rotation stuff. My switch/router mikrotik, also allows saving multiple copies of such backup onto its local filesystem, and allows you to select which backup file to restore. But that's if we want to get fancier. Just allowing the backup file to be downloaded to the user's PC (through webui) and to be restored is a giant first step. |
openhab-cli (which is part of openhab-distro I think) supports backup, so openhab-core would have to expose this somehow through the REST API. |
I'm playing around with this atm. |
Hi together,
reading the following thread:
https://community.openhab.org/t/how-to-backup-openhab-suggest-discussion-docs-and-future-docs-for-backup-strategies-which-is-lacking/100182/2
I'd suggest we could add a feature in the OH3 UI to create and restore a backup.
For now, backing up openHAB (or exporting the current configuration) needs you
Both options might be to complex for people who are not experienced with cli.
Forthermore this solution would be OS independent.
So my suggestion would be a section in the UI (let's call it Backup & Restore Configuration) that
This section should also tell what is to be exported and what not.
e.g. it does not export the ZWave controller settings or Grafana settings.
We also could think about making this extensible to add the possibility to directly create an Grafana or Zwave backup (if possible of course)
If such a request has already been filed or implemented into the OH3 UI, feel free to reject this here.
The text was updated successfully, but these errors were encountered: