Best way to upgrade to bullseye for openhabian

I’m considering upgrading my openhabian instance on rpi 4 (OH 3.3.0.M5) from buster to bullseye and I understand the preferred (read supported) method is to reinstall openhabian with bullseye from scratch. That being said, what is the least intrusive method that works?

  • upgrade in place using apt dist-upgrade? What is the experience with this approach?
  • install openhabian/bullseye from scratch and restore from openhab-cli backup? Any gotcha’s here?
  • another method?

Any input is appreciated.

Reinstall openHABian with bullseye from scratch will be the lest intrusive method that is guaranteed to work.

It’s more involved than that. You’ll need to manually edit the apt sources files first to point at bullseye instead of buster.

I usually try this first because many of my RPis are hard to get at. It works roughly 75% of the time. If you’ve not plugged in to a keyboard or monitor make sure to use screen or some other command to keep the upgrade running if you lose your SSH connection or else you are hosed.

I believe that’s what is meant by reinstall openHABian from scratch. Just make sure the new version of OH is the same as the old version. It usually doesn’t work to install a backup from an older version of OH to a newer version of OH. So this approach is the recommended approach.

The only gotchas are the openhab-cli backup only backs up openHAB’s configs. If you’ve edited configs for other openHABian services (e.g. Mosquitto, NodeRed, etc.) or data (e.g. InfluxDB, etc.) you’ll need to figure out how to backup and restore those yourself.

Thx, that helps. I’ve updated a couple of my other rpi’s to bullseye already so I’m not too worried about the mechanics of it.

I do like the cleanliness of going with a fresh install, does restoring from openhab-cli backup re-install add-ons/bindings as well?

Yes. If you do a full backup it’ll even back up the installed add-ons. A normal backup will cause OH to redownload and install the add-ons upon restore. But in both cases all the add-ons will be there (after a time) after the restore.

Always watch the logs for errors though in case something unexpected goes wrong.

Understood. I take normal openhab-cli backups on a sporadic basis that average about 100mb. I just took a full backup which appears to include the cache and it came out to about 560mb.

I’ll attempt my restore on a fresh openhabian bullseye install from the full backup and report back.


Well it’s done and working fine so far. I imaged the sd card as a backup and then did a fresh install of openhabian bullseye, then restored the openhab-cli full backup. Some obvious config steps need to be redone, like setting timezone, passwords, re-enabling zram and sd card mirroring, but all through the openhabian-config utility.

The only unexpected hitch I ran into was related to persistence. I use the mariadb jdbc driver installed in /usr/share/openhab/addons/ to communicate with the db instance on a nas. Although all the persistence setup was restored, the driver jar file itself was not and had to be re-added manually. I also ran into some cache issues with my amazon echo control binding which is a bit of non-standard setup in my case…but no fault of the restore procedure and clearing the cache via the openhab-cli console fixed the issue.

Other than this, no issue so far. Thx for the help.