All settings lost after an apt-get upgrade

Thanks for help, i setup a daily back of that folder.

I have not understood yet, because I lost all my settings after an apt upgrade

Marco

Almost the same scenario happened to me a couple of days ago. Needed to reinstall all my addons and after that openHAB2 was back to normal.

Same as me, so something happened.
Issue is not the Bindings, but HabPanel configurations. I lost all settings and panel. For this reason i need a setup.

Marco

I think I remember reading something about backing up Habpanel configs either on the great big Habpanel thread or the readme. All remember from it, and can’t find it quickly right now, was the settings are stored on your local machine unless you explicitly save it to the server. On the server it is saved somewhere in userdata.

I could be completely wrong of course but it might be worth asking @ysc directly.

Hi @rlkoshak
next time before to do an apt upgrade, I’ll perform a VMWare snapshot of OpenHab server, Then I’ll se whats happen.
Regarding HabPane, it save on local browser storage, or into OpenHab2 Variable, but I do not know for sure what it mean.
I did lot of apt Upgrade and never lost setting, except the last time. This is the main reason for I opened this post.

Thanks
for help.

Marco

same issue here. all settings ,bindings and addons are lost after apt upgrade, tested with offline and online version. Thats annoying.

It’s happened for the last few nightly builds that I have tried. The best method to alleviate this is to set up addons.cfg It takes all of 5 minutes to get it configured, and then after the apt-get upgrade you just have to wait a bit longer until all the addons are re/installed before the system is fully up and running.

I also find stopping the openHAB service before the upgrade helps, and then another restart after the install finishes. Dunno why, but I also clean out the logs while the service is stopped.

In a service configuration variable actually, retrieved and updated with the REST API. The backup/restore procedures of those are not clear to me.
If you have the Swagger UI installed for the API, you can retrieve it rather easily:
http://[your_server]:8080/doc/index.html#!/services/getConfiguration
The serviceId is org.openhab.ui.habpanel.

http://[your_server]:8080/doc/index.html#!/services/updateConfiguration will let you update it (just be careful)

That probably means it is stored in the system MapDB database which is located in userdata/mapdb.

I’m running in a Docker container with conf and userdata mounted into the container. Mine is set up to pull down the latest snapshot Image every time I restart the service. It has worked pretty awesomely well for me thus far.

Can someone clarify if this is intended behaviour or a bug?
Previously I installed bindings with PaperUI but didn’t add them to addons.cfg, and after an upgrade they were still there.

Ultimately this is the behavior we want. An upgrade should not wipe out your bindings and I’m pretty sure this is the direction the devs are heading.

I’m not sure I understand.
Previous releases did not wipe out the bindings.
The current release does.
So is that a bug that is being fixed?

I know in the meantime I can put entries in addons.cfg to get over it.
Just wanted to understand the direction.

I misunderstood your comment. I believe they are moving to where you shouldn’t have to reinstall bindings.

Sorry if I’m being dumb here, but we didn’t have to reinstall bindings just a couple of weeks ago.

1 Like

I was going to do another upgrade today to the latest nightly. But I also know my last one done about a week ago had also wiped out all my settings.

Can anyone confirm if this is a bug or new expected behavior?

And while I can add all bindings to the addons.cfg file, is there anything special needed or done to distinguish between 1.X and 2.0 bindings?

I remember I had lost all settings, transformations, actions, that were enabled, and had to re-enable habmin, habpanel, etc.

I just learned this myself. If there is no 2.0 version of the binding, just list its name (e.g. mqtt). If there is a 2.0 version of the binding but you want the 1.9 version append a 1 to the name (e.g. astro1). You must have the Legacy 1.x bindings option turned on.

I know the developers are working to ensure that having everything wiped out is being worked on but I don’t know the state of that. I also know that a few days ago a new update was made that moves a lot of configuration files from runtime to userdata (e.g. logging config) so even if this update does not wipe out your configs on its own, you may need to do so to get these changes (I did for my Docker instance).

For now, until they do figure out this upgrade process I would recommend using the text files (addons.cfg, etc) instead of PaperUI and Habmin.

You might be interested to follow https://github.com/openhab/openhab-distro/issues/299.

Looks as if my experience I just made, fits into this topic.
So maybe this is useful information to someone:

I did sudo apt-get update && sudo apt-get upgrade and afterwards all settings I’ve done are lost.
openHAB-Dashboard has lost HABmin. After I reinstalled it, for example the dashboard I created still exists.

No bindings installed anymore.
All things I have added before I updated keep appearing in configuration > things, but are set to uninitialized.
After re-installing a lost binding, associated things are set to online again.
Some bindings seem to reinstall very slow, like sonos-binding, which is installing since about 5min and still ongoing at the moment.

For me the main issue was that the bindings haven’t been installed although I had specified them in the addons.cfg
Furthermore after installation of the bindings the things did not appear (this was the case previously and the links to the items were still operational.)
after my upgrade today (openhabian OH2-offline) I needed to create all things again. :frowning:
By default a new ThingID is generated so you need to pay attention to put in the old ID to ensure that the items are still linked correctly.

I hope there will be an easier way to upgrade without loosing all the settings.