OpenHabian Jessie to Stretch upgrade

Hi,
I haven’t found much via search about the topic.
I have Openhabian running since some time still based on Jessie while openhab2 is from snapshot repos.
I found some old posts of people who were going to upgrade to Stretch but haven’t found a summary how it worked and what needs to be done.
Can I just more or less follow any of the Raspbian Jessie to Stretch update guides or are there important things to consider for the openhab part? I’m looking for any advice and pointers to existing howtos.

Thanks,
Wolfgang

You should be able to follow any of the upgrade paths. But in my experience it takes less time and is more reliable to take a backup of your important files and start over from scratch on Stretch. I know of nothing OH related that would prevent such an upgrade from working.

Given that Stretch is nearing two years old though, things may have changed since the last time I tried to do an in place upgrade.

Thanks for your quick hints.
The only thing is that I’m not expert enough in openhab (at least I feel so) to know what to save/restore.
Yes, /etc/openhab2 but not sure what else.
I will first create a backup image from the SD-card and try an in place upgrade. Therefore I can easily rollback at least if I don’t get it to work.

sudo openhab-cli backup

But this will only back up openHAB stuff. You will have to look for how to backup InfluxDB, Mosquitto, etc if you are using any of these third party services.

I did Jessie to Stretch upgrade few months back, using Raspbian procedure, it did work. Mind the free space though, keep at least 1 gig free.

I remember I had to upgrade kernel manually to get kernel headers installed. Headers are needed if you compile custom driver sources on your Linux. Not sure thats needed in your case.

Debian (Raspian) upgrade should work just fine (basically a matter of pointing to the newer package repositories), but don’t forget to make a full backup of the SD-card first!

At least, you should do these steps (in this order):

  • sudo apt update
  • sudo apt upgrade
  • sudo apt full-upgrade (maybe you have to use sudo apt-get dist-upgrade instead)
  • change settings in /etc/apt/sources.list to use stretch instead of jessie
  • sudo apt update
  • sudo apt upgrade
  • reboot
  • sudo apt full-upgrade

I did do the upgrade basically like recommended here and it seems to be successful. At least up to now I haven’t found things failing for around a week incl. OpenHAB, Grafana, telegraph, influxdb.
Thanks for the hints given here.

1 Like