Snapshot #934 not working properly

@ssvenn, here’s wat I did yesterday (for the record, I was already on a 2.1 snapshot version, but the upgrade to #938 broke it anyway).

First I created a backup of the files as indicated in the wiki. In addition to the commands listed above, if you made changes to the /etc/default/openhab2 file, backup that one as well.

Then I completely removed and purged openHAB:

sudo apt-get remove --purge openhab2*

Install openHAB again:

sudo apt install openhab2

Do not restore the backup using the commands provided in the documentation. (I did and had to purge the installation again).

Check the ownership of your backup. For me the files were owned by me and not the openhab user/group. If that is the case for you too then first assign the correct permissions:

sudo chown -R openhab:openhab ~/openhab2-backup-$TIMESTAMP

Now copy the following files/directories:

sudo cp -a ~/openhab2-backup-$TIMESTAMP/conf/* /etc/openhab2
sudo cp -a ~/openhab2-backup-$TIMESTAMP/userdata/etc/org.openhab.addons.cfg /var/lib/openhab2/etc/
sudo cp -a ~/openhab2-backup-$TIMESTAMP/userdata/jsondb/* /var/lib/openhab2/jsondb/

If you created a backup file of the /etc/default/openhab2 file then copy that file back to the /etc/default/ folder.

Now you can start openhab2 again:

sudo systemctl daemon-reload
sudo systemctl start openhab2.service

If it starts up properly again then also make it start on boot:

sudo systemctl enable openhab2.service

Hope this helps.

2 Likes