Safest and fastest upgrade from Version 3.2 to 5.x

Hi everyone!

I’ve been using OpenHAB since 2019 (I think). But I stuck with v3.2 since I have no upgrades with my devices, and the system works great since then, until I want to add more devices, and I need to upgrade to v5. x.

Can you show me how to upgrade in the safest and fastest way possible?

Thanks, everyone, for the cooperation that makes this ecosystem more user-friendly and fascinating to everyone, even though I’m continents away from everyone!

my server unit is:

RPI 5 with 8GB memory

sonoff tasmota devices

serial rs485 RTU devices (Power meters and actuators) using USB to RS485

RF433 devices with sonoff/tasmota gateway

Zigbee Devices (currently disconnected) with sonoff/tasmota gateway

Are you running 32-bit Linux or 64-bit Linux? Are you using openHABian or some other installation method?

Pretty sure you can backup your config (using openhab-config from the command line, then you can simply flash the latest version onto the SD card, and restore your config after it all starts up.

1 Like

If you have a new PI you want the 64bit version, so you cant simply do a version upgrade… clean install only.

1 Like

OK, since it is 64-bit Linux running openHABian the fastest will probably be:

  1. take a backup, preferably a whole SD card image
  2. using openhabian-config to upgrade
  3. once OH has a chance to settle after the upgrade restart OH
  4. watch the logs for errors; review the release announcements for breaking changes you have to deal with manually

However, debian buster reached end of life more than a year and a half ago. So it’s no longer supported and no longer receiving updates. So if it were me I’d take this opportunity to upgrade the whole OS to something supported (trixy is the latest). With that approach:

  1. take a backup of your openHAB and any other third party services you are running on the machine (e.g. influxdb, mosquitto, etc). Get this backup off of the machine.
  2. Using the Raspberry Pi Imager burn the latest openHABian image to a new SD card.
  3. Edit /boot/openhabian.conf on the just burned SD card as appropriate with wifi settings and such. Put the openhab backup zip file there and set openhabian.conf to restore from that backup file. Set the verison of OH to install 3.2 as well. See the openHABian docs for details about all this.
  4. When everything is installed and configured verify everything is working. Restore your other services as necessary.
  5. Now, using openhabian-config upgrade to openHAB 5.1.
  6. Wait for OH to come up and settle and then restart OH.
  7. Watch the logs for errors and review the release announcements for breaking change you need to deal with manually.
2 Likes

Thank you very much! Appreciate your patience in helping me.