I need some advice. I’ve been using OH (OpenHabian) for quite some time now on a raspberry Pi 4 and i’ve always been on the 32 bit image, dutifully updating via openhabian-config and currently on 4.3.5. Since OH5 doesn’t seem to work on 32 bit with this hardware/Java combo, i guess it’s time now to switch to 64 bit. How do i accomplish this? I tried taking the current OpenHabian 64 bit image, which comes with OH5, and importing the backup from my 4.3.5 system, but then i end up with a broken system.
I haven’t done this myself so I might miss a step. But the approach I’d try is:
Install openHABian. IIRC you can set the version of OH to install through openHABian.conf. If not, let it install OH 5. Then I’m openhabian-config choose 4.3 to be installed.
Now import your backup.
Once everything is working properly on 4.3, upgrade to 5.
The big problem with restoring a 4.x backup to 5 is it slips a bunch of automatic upgrade steps to adjust your configs for the new version. That leaves you with a broken config.
Now it might be possible to do this alternative approach as well.
stop OH 5.
restore your 4.3 config
clear the cache just in case it’s full backup
manually run upgradeTool.jar (I think there’s an option in openhab-cli but if not, it’s in OH’s bin folder (/user/share/openhab/bin if I’m remembering correctly)
Note there is a bug in upgrade tool right now. You might see an error. Check the 5.0 release discussion thread for details. If you don’t have any custom semantic tags defined in a yaml file you should be able to ignore that error.
Thanks again, Rich, that worked for me. A few additions for future readers of this post:
The first option doesn’t work since changing the version to be installed in openHABian.conf has no effect whatsoever. It will always install OH5.
The openHABian image defaults to timezone Europe/London. If you are not situated in that timezone and change it via openhabian-config, the system timezone wil be changed but not the -Duser.timezone in EXTRA_JAVA_OPTS in /etc/default/openhab, which in my case made my fixed-time rules trigger one hour late. Searching the forum tells me that has been the case for a long time? ( [SOLVED] Log time vs System Time - Mismatch (No Timezone Adjustment) - #4 by BigRedBrent ).
I just want to verify these are the best steps (I’m running Pi4 32 bit, upgrading Pi5 64 bit)
Purchase Pi5
Image Pi5 with OH 5.0
Upgrade my Pi4 32 bit OH 4.3.5 to 4.3.6 to ensure upgrade tool works w/o issues
OH 4.3.6 Backup Pi4 32 bit
Rich’s steps:
stop OH 5 on Pi5 64 bit
restore your 4.3.6 (backup vs. config)?
clear the cache just in case it’s full backup
manually run upgradeTool.jar (I think there’s an option in openhab-cli but if not, it’s in OH’s
bin folder (/user/share/openhab/bin if I’m remembering correctly)
Frans steps:
The openHABian image defaults to timezone Europe/London. If you are not situated in that timezone and change it via openhabian-config, the system timezone wil be changed but not the -Duser.timezone in EXTRA_JAVA_OPTS in /etc/default/openhab, which in my case made my fixed-time rules trigger one hour late. Searching the forum tells me that has been the case for a long time? ( [SOLVED] Log time vs System Time - Mismatch (No Timezone Adjustment) - #4 by BigRedBrent
Step 3 is probably unnecessary. There is almost nothing different between the two versions and nothing that changes anything to do with your configuration.
In the current OH 5.0 the upgradeTool won’t work so there’s no need to run that. If you are on 4.3 all the steps that it can do will already have been done to your config. It should be part of then process in the future, but in this particular instance it’s not required and won’t do anything even if it wasn’t broken.
However, pay attention to userdata/etc. There are some files there you don’t want to overwrite during the restore, particularly versions.properties.
Assuming you are careful to clear the cache, yes. There really usually isn’t that much of a difference in the configurations from one version of OH to the next and those things that are different are covered in the breaking changes. Between 4.3 and 5.0 there are very few breaking changes.