Openhab 4 upgrade

hello guys. I just briked my installation on my RPI OH3 going to 4.
I updated yesterday, first thing that happened was that the front end didnt load anylonger.
I guessed it was Java so tried to updated to 17 as per instructions and got repeat failed on the retrieving part of the update.

i then tried to update everything via the config tool and it stopped working all together. Before i could putty into the text interface but now it has stopeed responding.

Good news is I have an old version of SD card image (missing about 6months of changes) which means i can recover at least in part.

could someone with a deeper understanding help me tranfer my rules/devices/etc from the current version? (i have made small changes here and there to rules and added some devices during the past 6 months?)

is there anything besides items/things/rules i might be missing here?

thanks to the cleverer people for the time :slight_smile:

(from reading around i see only direct restores etc and am missing the copy file version. That and i am leaving on holiday in less than 48hours so trying to move quickly)

Use openhab-cli backup and restore and that will grab everything. Without knowing how you’ve configured everything it’s impossible to know what exactly you need but in general you need all of /etc/openhab and most of /var/lib/openhab to get a full backup.

Be sure that your new installation is the same version as the old one before running the restore. Then upgrade. Attempting to restore a config across versions, particularly if you have some managed configs, will skip the upgrade process which will leave you a bunch of manual changes to make.

1 Like

thanks Rich - as always appreciate your taking the time to help- perhaps i didnt explain my position well enough.

I cant opehab-cli backup because the “bricked version 4” doesnt allow me to connect anylonger via putty *i will try actually to connect locally (keyboard and screen - incase it is a network issue)

i have a working copy of 3.4.2 but witj month old settings (which isnt upgrading correctly to version 4 either as Java 17 is failing exactly like this case. After upgrade to OH4 -remote connection refused - #10 by Wolfgang_S

i can access the SD card of the bricked version by using (on windows) Linux_Reader.exe
I would love to try and recover from the bricked v4.0 the items rules things that i have there by (copying?) the files to the old version.

basically a manual cli backup. my changes are primarily things + rules so i dont think i will loose much otherwise (nothing too complex)

does that make sense? is it indeed the folder you just mentioned in this use case?

But you can on the older backup SD card. I thought you were looking to copy the config from there to a new install.

There is a script in the bin folder for OH. You can see if you can run that script. If not you can try to grab everything from those two folders except the /var/lib/openhab/cache and tmp folders and cross your fingers. But you really have no way of know whether those configs were upgraded to 4 or are still 3 so will it work? :person_shrugging:

But you can on the older backup SD card. I thought you were looking to copy the config from there to a new install.

I have a working version of 3.4.2 (but outdated) so my MVP fix to leave a working system is(as i am about to go on holiday is)

  1. just run with it (seems ok although missing some updates)
  2. run it as is + and update the things items. If this works I can wait for version 4 which is not working for me due to java 17 failing to install ( i guess)

in a perfect world i would clean install 4 and tranfer everything from either 1 or 2 above.
(i could also do a mix of everything but right now as time is the biggest issue. a 3.4.2 version with a quick items/rules/things update would probably serve

then yes i think i will try to do a clean install and transfer things.

(bonus question. the linux version opehabian runs on is the clean install right? - so by a clean install i get the most recent linux version also?)

If you download the latest SD card image than yes you’ll get the latest raspberry pi OS version.

Well, in fact, Raspberry Pi OS is bookworm since June, and openHABian 1.8 Image is still bullseye, so no, it’s not the latest and greatest… :slight_smile:
But both should and will work (and you can install openHABian manually to the clean bookworm Image for convenience).

Debian has released bookworm but the latest version of Raspberry Pi OS is still bullseye, at least according to the download website: Operating system images – Raspberry Pi

Raspberry Pi OS is not stock Debian so it usually takes a little bit of time from Debian release and Raspberry Pi OS release, though I expected support to be available before now.

you guys are just teasing my complusion now… do i wait for the new version :slight_smile: thanks for the answers. the conclusion for people reading is.

  1. my old openhab version 3.4 was running on a previous linux version (Debian Buster)
  2. the new 4.0 openhab/openhabian needed the newer linux version (Bullseye) to install java 17 which is mandatory.
  3. so the front end crashed due to the incompatibility with java 11. and java 17 wouldn’t install due to incompatibility.
  4. as a bonus the dhcp service crashed during all this (no idea why) so i couldn’t access the RPI remotely but after some sound advice in here i discovered i can access locally (with screen and keyboard)

Using the local access - i managed to backup using openhabian config (backup option menu) , transferred the file using a RPI with Rasberry OS to the new Bulleye SD image and restored. it worked i only had to reinstall ffmpeg and a script for the argon case fan to keep it from working all the time.

so back up and running fully.

thanks guys for helping!

1 Like

Oh, sorry, my bad. still “testing”…
Was so overwhelmed to read that finally Raspberry Pi OS is bookworm, too (but for sure will be soon…)

Other Raspberry Pi OS (e.g. Stretch and Bullseye) releases have come out 2 and 3 (respectively) months after the Debian release date - so I imagine we may have some more time to wait.

I don’t expect there to be a noticeable day-to-day difference for many openHAB users, RPi OS bullseye is already on the 6.1 Kernel and contains Java 17. (I currently use a Debian bookworm image on my RPi 4 and I’m not sure I can tell!)