So I have a main OH server running 4.3 and plan to upgrade soon to 5, but I also have a secondary box I have still running OH2 that I’ve never gotten around to upgrading. Wondering if I can just back up, install 5 and restore my backup?
There were major changes to configs between OH 2 and OH 3. Significant changes between OH 3 and OH 4. And only minor changes between OH 4 and 5.
That would probably work for your 4.3 server to upgrade to 5.0 but for the 2.5 to 5.0 simply restoring the backup is likely to result in more work than if you spin up a 5.0 instance and gradually migrate your config over.
There are lots of different approaches you can use. When I first moved to OH 3 I moved over binding by binding. But you could start with rules or what ever so long as you have a way to avoid trying to migrate too much at once. The remote openHAB add-on can help here as it lets you keep the old and new instance in sync and you won’t lose any functionality while migrating.
When something doesn’t work, be sure to review the breaking changes announcements for all the versions between 2.5 and 5.0. Somewhere along the way you’ll find a description of a breaking change and how to adjust your config accordingly.
Off the top of my head the sorts of issues you’ll face include:
- ZonedDateTime changes in rules
- lots and lots of changes to Things based on the add-on
- unit of measurement was overhauled twice between 2.5 and 5.0
- semantic model
- lots of new features, though you should already be familiar with those since you are running 4.3 on your main server
The hardware requirements have also changed. Depending on your situation it might also be possible that an in-place upgrade is not possible at all.
Thanks, this old instance is running on my main desktop which is somewhat beefy but appreciate the heads up.
Thanks @rlkoshak yeah, this is a pretty minimal install, just MQTTing a few things from my desktop to my main OH RPI. I think I probably will just spin up a fresh install and move things over to that.
Hi @rlkoshak,
I was just thinking about installing a new 5.0 instance on the same machine while I gradually move things over from the 2.5 I have installed. I guess if these are on the same machine they are going to fight for the same port 8080 correct? Anything I can do to prevent this conflict or do I need to put 5 onto a different machine while transitioning?
Correct. You can change the default ports for OH. How depends on how OH is installed.
However, there’s more than just port 8080. 8443 is the HTTPS port. The LPS service is on port 5000 I think. Some bindings open their own ports too.
If you have the option to use Docker, a VM, or another machine or something like that, it will probably be smoother over all.