Migration from OH2.5.11 to OH3

Merry Christmas everyone :wink:

I tried to upgrade my OH 2.5.11 to OH3 (Openhabian on RPI4) a few times, but always messed up.
What I’ve done so far:

  1. Upgrade directly from 2.5.11 to OH3 with openhabian-config -> failed due to a lot of errors and issues
  2. Clean OH 3 Installation and restore of OH2.5.11 backup -> failed due to a lot of errors and issues (e.g. all Things/Channels/Items created by PAperUI are missing)

What I now want to do:

  1. Clean Installation OH3. Installation of all necessary addons is done
  2. Move over my configuration step by step.

Here I have 2 questions:

  1. I have created ~250 Things with 1000 Channels and Items in OH 2.5.11 PaperUI.
    How can I move over the Things/Channels/Items to OH3?
    Is there a file which I can copy?
    Could I make a database export/import?

  2. I’m using RRD4J and MAPDB as persistence in OH 2.5.11
    Is it possible to move over the stored data from OH 2.5.11 Installation to OH3?

If I manage to get it running, I will create a migration document, maybe this is helpfull for other users!

Thanks a lot for all of your good work!

1 Like

Merry Christmas everyone
I’ll hang on here.
I currently have OH2.5.11 on Raspberry Pi4 with 15 dashboards and loads of things and items, partly created in PaperUI and partly as *.things and *.items files as well as many rules files and some *map files. For smartphone usage I have created some sitemaps.
I searched the internet a lot and read how to migrate from OH2 to OH3 and unfortunately I couldn’t find a conclusive procedure.
In OH2.5.11 I created a backup with ‘openhab-cli backup’ and created a new OH3.0 server on a second Pi4 with the image openhabian-pi-raspios32-v1.6.2.img.xz.
How can I transfer my configuration to the OH3 with as little effort as possible?
Thank you for any help in advance.

You should be able to restore the backup made from OH2 into OH3:

openhab-cli tool (opens new window) to interactively backup/restore your openHAB config [menu option 50/51].

I am not sure if it also restores persistence.
Now also rebuilding everything on a second PI and recreating all the things and items manual to have maximal benefit of the model.

On Clean installation:

It looks like an error in openhabian-config. I created a Symbolic link. After next try of restore:

I also have tried to restore manually with
sudo openhab-cli restore /var/lib/openhab/backups/openhab2-backup-202012240046.zip

But this leads into a lot of errors and issues (e.g. All Things and Items, which where created in PaperUI are missing in OH3!)

Do you see any errors in the shell that are printed while the config tool fails? It usually will still print output to the shell that you can see once you close the config tool…

sure:
2020-12-24_13:07:06_CET [openHABian] Checking for root privileges… OK
2020-12-24_13:07:06_CET [openHABian] Loading configuration file ‘/etc/openhabian.conf’… OK
2020-12-24_13:07:06_CET [openHABian] openHABian configuration tool version: [stable]v1.6.1-1021(01d4e59)
2020-12-24_13:07:06_CET [openHABian] Checking for changes in origin branch stable… OK
2020-12-24_13:07:08_CET [openHABian] Switching to branch stable… OK
2020-12-24_13:07:13_CET [openHABian] Beginning restoration of openHAB backup… OK
2020-12-24_13:07:16_CET [openHABian] Restoring openHAB backup… FAILED (stop openHAB)
2020-12-24_13:07:21_CET [openHABian] Checking for default openHABian username:password combination… OK
2020-12-24_13:07:21_CET [openHABian] We hope you got what you came for! See you again soon :wink:

Please be aware that I have stopped OH before:
sudo systemctl stop openhab.service

No more openhab processes are shown with htop!

I also tried “manual” copy of:
/etc/openhab/*
/var/lib/openhab

(Source where the files of OH 2.5.11)

All Things/Items which are Filebased configured are there, All Things/Items, which are configured thru PaperUI on OH 2.5.11 are missing.
Really sad to say: "I don’t think, that migration from OH 2.5.11 to OH3 (with a clean installation ist working)

Hmm maybe you could try installing OH2 and restoring your OH2 backup there, then upgrade to OH3?
Or is this already something you tried?

Hi, I also tried this.
Than the Things/Items are there, but tons of error messages in openhab.log File…
I think also now way to go…

I fear you will have to look at the tons of error messages at some point. What kind of errors are there?

Regarding the migration of PaperUI config, maybe this is helpful for you:

However, I have not tried the migration by myself yet.

I also tried a restore from a v2.5 backup to oh3. I am currently running the latest 2.5 on Windows 10. I created a backup zip file there using the batch routine, copied it to my Raspberry Pi running a fresh install of OH3, and did a restore using the configuration menu.

It failed without any details on the reason for the failure (puTTY screenshot attached). And now I get a ‘site can’t be reached error’ when I go to http://openhabiandevice:8080/.