Migrate old openhabian instance (Jessie/RPI3) to OH3 on RPI4

I am running OH2.5.5 on RPI3 with a very old install of openhabian (Jessie) on a 4GB SD card. Making a clone of the card and run it on a test RPI3, I have made several attempts to do an in-place upgrade, but never succeeded. OS upgrade failed due to disk space issues. Alternative approach by copying the image to a larger card, resize the partition and then attempt a new OS upgrade also failed.

I now took a different approach

  • take a backup of my running OH with openhab-cli
  • do a fresh install of openhabian on a new RPI4
  • downgrade the new install to OH2.5.12 with openhab-cli
  • restore the backup.
  • upgrade to OH by using option 03 in openhabian-config

The OH2 instance on the new RPI4 seemed healthy. All things and items were present, rules were executing etc. After upgrade to OH3, only the things and items that were defined in text files, were there. All things and items I created via Paper UI in my old install, were not there any more.

Questions:

  • Is my migration plan as explained above supposed to work?
  • Is there a way to find out why the things/items that are in my jsondb in OH2 don’t show in OH3 after upgrade?
  • Is there another migration approach that has a bigger chance of success?

You should not downgrade but install OH2 right away (clonebranch=stable in openhabian.conf)

Thanks, I hadn’t thought about that one. After flashing openhabian-pi-raspios32-v1.6.5.img to SD card, I made this edit:

# repo and branch to clone from
repositoryurl=https://github.com/openhab/openhabian
clonebranch=stable

Still, this is installing OH3.
This is – I think – the relevant section in first-boot.log, where it mentions that OH3 will be installed

2021-10-03_20:54:55_CEST [openHABian] Installing cached version of Java to ensure that some form of Java is installed!
2021-10-03_20:54:55_CEST [openHABian] Installing Java Zulu prerequisites (libc, libstdc++, zlib1g)... OK
2021-10-03_20:54:55_CEST [openHABian] Installing Java Zulu 11 32-Bit OpenJDK... OK
2021-10-03_20:54:56_CEST [openHABian] Installing Java Zulu CEK to enable unlimited cipher strength... OK
2021-10-03_20:54:59_CEST [openHABian] Installing Java Zulu prerequisites (libc, libstdc++, zlib1g)... OK
2021-10-03_20:54:59_CEST [openHABian] Downloading Java Zulu 11 32-Bit OpenJDK... OK
2021-10-03_20:56:03_CEST [openHABian] Installing Java Zulu 11 32-Bit OpenJDK... OK
2021-10-03_20:56:03_CEST [openHABian] Installing Java Zulu CEK to enable unlimited cipher strength... OK
2021-10-03_20:56:04_CEST [openHABian] Beginning install of latest openHAB3 release (stable)... OK
2021-10-03_20:56:04_CEST [openHABian] Adding required keys to apt... OK
2021-10-03_20:56:05_CEST [openHABian] Installing selected openHAB3 version... OK
2021-10-03_20:58:44_CEST [openHABian] Setting up openHAB service... OK
2021-10-03_20:58:45_CEST [openHABian] Optimizing openHAB to run on low memory single board computers... OK
2021-10-03_20:58:45_CEST [openHABian] Setting openHAB HTTP/HTTPS ports... OK
2021-10-03_20:58:45_CEST [openHABian] Creating dependencies to jointly start services that depend on each other... OK
2021-10-03_20:58:45_CEST [openHABian] Adding an openHAB dashboard tile for 'openhabiandocs'... OK

Thanks for pointing me in the right direction.

Could you please check if the new v1.6.6 image makes a difference and let me know ? thanks

First install failed, but I forgot to keep the first_boot.log. Sorry for that. I then flashed the image all over, enabled debug logging. OH2 seems to install properly and I can access the UI.

In the debug log I see some errors that you might find interesting:

  • some are related to file paths openhab2 vs openhab
  • some are related to the frontail/npm issue that has been reported elsewhere on this forum and not really relevant.

first-boot.log (84.4 KB)

Steps I took for upgrading to OH3:

  • select openhab3 branch in openhabian-config
  • upgrade to OH3 using option 30 in openhabian-config

All my things and items now are in OH3 and the system seems healthy.

Please download latest v1.6.6 image and try again to install right to OH2.

Which branch should I choose in openhabian.conf? I now see:

# repo and branch to clone from
repositoryurl=https://github.com/ecdye/openhabian
clonebranch=o2fix

Should I change this into “stable” for installing OH2?

Regardless whether I choose “o2fix” or “stable” branch, it installs OH3.

First boot log for the case where I entered “stable”:
first-boot.log (83.5 KB)

You are using the wrong image. You have begun using a testing image which was built for testing purposes only that points to my branch of openhabian. You should try using the image that will be posted here once it finishes building it.

Uploaded the new release image. Link remains.

I now used openhabian-pi-raspios32-202110061525-git921e80c-crc19dd20cb.img.xz

This image installs OH3 when selecting stable in openhabian.conf:


# repo and branch to clone from
repositoryurl=https://github.com/openhab/openhabian
clonebranch=stable

Debug log: first-boot.log (83.2 KB)