So I am sitting on a very old version of Openhabian, which says I can not upgrade:
So how can I smoothly upgrade my system, @ThomDietrich ?
I do have all my items/ rules files here:
I did copy all my .cfg files to my hardrive
I did change the user of openhab to admin to get GPIO to work, is that bug fixed?
I installed OLA this way:
So I guess the only thing I need to figure out is how to backup the persistence and all the config stuff made by paper UI, @rlkoshak mentioned that these files could be found somewhere on the RPI
So my step by step suggestion:
Rewrite the json DB for things discovered by PaperUI to .things file (located where?)
Make .addon file to list all bindings needed(how?)
Copy over the persistence files(located where?)
Copy over all the.cfg files in here /etc/openhab2/services/ to my windows 10 laptop using samba share
Sudo shutdown
Take out the SD card
Download and write latest openhabian to a NEW SD card
Power up RPI
Do sudo openhabian-config then 60 and press through all steps
win+E type in //openhabian copy over files to /etc/openhab2/services
grab files from git(how to do this?)
Install OLA
Reboot
And hopefully my system will work! Otherwise swap back to the old SD card…
Is this the procedure whenever you want to get a fresh system up running?(When the RPI starts to LAG…)
It depends on the database. The embedded db files (rrd4j, mapdb, etc) are stored in userdata/persistence. For other dbs like MySQL and InfluxDB you will have to look at how to backup and restore for that db. I do know that InfluxDB and PostgreSQL store their db files in /var/lib.
If you are on a recent OH (2.2) there are backup and restore scripts in /usr/share/openhab2/bin (I think) that you should use.
But, if you are sticking to the same version of OH and just upgrading openHABian then the following should work.
Stop openHAB
Create backups of /etc/openhab2 and /var/lib/openhab2 and move them off the SD card
Download the latest openHABian to a new SD card and follow the instructions for a new openHABian install.
In openhabian-config make sure to configure samba to share all the OH files (I forget what menu and my little test machine is offline).
Stop openHAB
Copy the backup of /etc/openhab2 to //openhabian/config (or something like that)
Copy the backup of /var/lib/openhab2 to //openhabian/userdata (or something like that)
So will all addons be automatically installed if i just copy files back and forth? I thought there is a file somewhere where I can spesify which addons to install…
I was also thinking about moving the things configured in paper-ui to .things files, how can I do this?
All the addons installed through Karaf or PaperUI end up in userdata. By copying userdata over completely you will get all the addons. Note that this only works if you are moving to the same version of OH. If you are moving to a new version then you need to reinstall the addons and the above procedure won’t work.
If you want to manage your addons through text config instead of PaperUI et al you cna use conf/services/addons.cfg.
Depends on the binding. Some bindings have a well defined and documented way to create Things in .things files (e.g. Astro). Others do not. For example, to use .things files with Zwave you need to use the development version of the binding and you have to troll through the forum to find the syntax for the Things. Support for text based Things is not yet supported in the officially released binding or even in the snapshot.
It seems like the only thing I had configured as things as json db were chromecast binding, which I dont use since it does not support youtube… and lots of autodiscowered network devices
For persitance I found all my rrrdj4 files, they are now safely been backuped
However it seems like the config files for the installed bindings are stored at differnet locations inside the userdata(etc, root,org…) as well as in the textfile in the addons catalog.
So to quickly reinstall all the bindings I need to make a addons.cfg file, however its not completly clear to me the syntax of this file. I assume its comma seperated,
I do use :
Bindings:
Astro,
Chromecast,
dmx-ola,
exec,
expire,
gpio,
http,
mqtt,
netatmo,
network
user interfaces:
Basic UI
Paper UI
persitence:
influxDB(not implemented yet)
MapDB
RRD4J
actions:
mail
pushover
then transformation
exec
javascript,
json
map
misc:
Hue emulation(Gonna swap over to the alexa binding)