I know I can load manual or non “official” bindings in the /usr/share/openhab2/addons folder
But where are those installed via the paper UI living, and it that worth backing up as part of a restoration process?
I guess what I’m really after, is in the event of an rebuild, I can pull all my items, rules and sitemaps etc (which is why I also tend to write .things files rather than using the jsondb), but how can I restore all of the addons that I’ve installed, all the transformation addons, zwave, network, networkups?
I think I’ve seen that you can update a .cfg file somewhere with the loaded addons, and they are downloaded for me (Is that correct?) and so if I add via paper ui is that .cfg file updated, or do I have to remember to do it each time if that addon becomes part of my build.
This will backup /etc/openhab2/ and /var/lib/openhab2/
This way, the information about installed addons is backuped, but not the addons itself, so when installing openhab2 new, the actual version of the bindings will be installed.
The only things to backup in addition, are the manually installed addons.
How will the actual bindings be installed? Do I manually have to hit install on all of them (and therefore remember what I’d installed), or is it held in some config that tells the system in a restore to automatically get x, y and z bindings as that’s what was installed.
conf/services/addons.cfg (where conf is your config folder, /etc/openhab2 on an installed OH).
No. If you use addons.cfg then you must manage the installation of ALL of your addons through that config file. If that file is not empty (or all commented out) then any addon not listed in that file will become uninstalled.
The latter. It would be a pretty poor backup and restore if you had to reinstall everything after a restore.
This is incorrect. You can configure only the bindings if you so wish. Or only the transformations and actions…
Any line uncommented will take over from the PaperUI config.
I have gradually moved all my config to the addons.cfg
WARNING: For market place binding you need to add “binding-########” to the binding comma separated list.
SECOND WARNING. During major openHAB updates the addons.cfg will be replaced. Keep a copy of your file so that you can restore your lists of installed bindings, actions… and modify the new file after the update.
Using the addons.cfg is far more reliable than the paperUI
Reliable in what ways? I’ve used addons.cfg almost from the beginning because the Docker configuration did not handle upgrades meaning every time I created a new container I would have to clear out my userdata and rebuild the whole OH config.
However, now that the Docker image does handle upgrades properly I wouldn’t hesitate to recommend using PaperUI for binding installation.
To be more precise: apt as the tool for update will ask before overwriting any manually changed file, and more… if choosing to overwrite, the old file will be renamed to <filename>.dpkg-old, while the other decision would result in a new file with <filename>.dpkg-dist, so in case of update, you don’t need a backup to prevent data loss.
And just to add to the discussion, you will always want to copy your content to the new file, whether you say yes or no during the apt-get as when this happens it is usually because something was added, removed, or the format of the file has completely changed and the old version of that file may not work as is.