Using OH2.5 and 3.0 in parallel instances during migration

OH3 sounds like a big great future. Thanks for all dveloping it.

I have a running OH 2.5.11 Version with a lot of stuff on a Dell Server with Ubuntu 20.04.

Already read the release notes, issues and update guidelines from OH2.5 (most about openhabian?)

In Forum I found the note, specially for Actions V1 there could be a parallel running of OH2 and OH3 with OH3 Bindining to use parts of OH2 which not migrated yet.

I thought about installing OH3 now and transfer binding for binding to new version.

But nowwhere found some hints how to do. OH3 has other configuration directories, so maybe it should work if just install OH3. But somewhere there was an important note, not to use OH3 and OH2 on same system same time.

Can anybody give me a hint if its a good plan just to install OH3 without get OH2 broken? I could life with need to stop OH2 first before starting OH3, but cannot risk a longer broken system. :frowning:

Both OH 2.5 and OH 3 use the same networking ports. You can’t have two programs on the same machine connected to the same ports at the same time. Which ever OH instance starts up last will fail to run because it can’t get access to the networking ports it needs (e.g. 8080, 8443, etc.).

In order to run both instances on the same machine at the same time you will need to configure one of them to use a completely different set of networking ports (e.g. instead of 8080 OH 3 would use port 9090). I’m not entirely certain where that setting resides. Probably somewhere in /var/lib/openhab/etc.

Another problem you may have is if you are using any physical hardware directly connected to the server (e.g. a USB Zwave Controller), only one instance of OH can use that device at a time.

Thanks Rich,

the issue with the Ports I know and I think I remember where to do. That’s clear for me.

I just concerned about the configuration files, but as I understood your post, that wouldn’t be a problem (The warning in the migration informations was a little bit unclear because of the warning of openhab-cli, openhab itself uses different config directory.

The hardware problem like zwave stick and other stuff I will try with deinstall on OH2.5 and then install in OH3. This should solve this. In case of fall back I think I then only will need to deinstall binding in OH3 and reinstall in OH2.5.

I will risk to give it a try and then inform here so others can use my experiences :wink:

A short update for community:

Installing OH3 on same system is not as easy, as I thought and nothing for beginners :-/

But I got it running.

Result:
Both instances could run same time! But because OH3 installation automatically takes configuration from OH2 then, so it’s no good idea to keep both running at same time, as Rich already mentioned. You can if you have got older actions if you have parts in OH2 and other Parts in OH3, but not during migration.

Option a) clear new configuration and transfer step-by-step (but you would still have to cleanup some other overtaken “garbage”, so nothing for beginners.)
Option b) stop openhab2 running, start openhab3 and do the same garbage-cleaning :smiley:

Disadvantage: Overtaken configuration has to be cleaned up

Advantages (if option b):

  • You can take time to migrate rules, scripts, configuration, errors due to Update until everything works fine under OH3. And if less of time, just stop OH3 and start OH2 again ==> Everything running fine again.

  • If all things supported from OH3 running, you can delete this parts in OH2 and then use the binding to join both instances to keep some older stuff working until these actions are supported in OH3.

Because it’s really for people knowing what they are doing, I decided not just to post what I did here, if I would, then everything without guarantee :wink:

If some people are interested (just let a like in this post) I will answer with a how-to (ONLY WORKING ON UBUNTU) of course.

1 Like

I didn’t think of it before but it would be easier to install OH 3 manually (i.e. unzipping to /srv/openhab). This will prevent the OH 2 config from migrating to OH 3. Then you can migrate the stuff little by little. Once done you can run a backup, do a “real” install of OH 3, and do a restore.

I think something like that could work and it might be easier.

And of course, it’s super easy to run multiple instances of OH side by side using Docker, but that’s a more advanced approach too.