Downgrading openhab 4 to 3.4

Goodmorning everyone.
I’m sure this is a popular topic but i coundn’t find any answer that worked for me.

I’m running OH on RPI4.

I accidentally upgraded to openhab 4 during an apt upgrade. I wasn’t aware of this new v4 distribution so i cound’t imagine this would happen. My mistake.

After the system upgraded to OH4, i obviously miss java 17, which i can’t install being the system on buster dist.

Since i can’t phisically access my rpi, i would like to revert back to OH3.4, there was nothing wrong with that, and i will proceed with an update following the manuals next time i have phisycal access to the device.

I do have a backup, and the system was mirrored to an external SD card for failover.

How can i proceed with a downgrade?

Would the sd card swap revert the install back?

Thank you so much everyone

You can try the mirrored card to see whether or not it was updated. Nothing to lose if it doesn’t work. Otherwise, you’ll have to go to your backup.

Assuming you get it working and want to stick with OH3 for now, the link given by @lfs_alp5 has the commands needed to avoid updating to OH4.

There’s generally a new release (major or minor) annually. OH4 was released over a year ago, and the 4.1 version came out in December. Just something to keep in mind in the future.

I recently wrote this tutorial to help users regularly keep tabs on releases by email. We know that a lot of people don’t visit the community regularly, which makes it difficult to stay up to date.

1 Like

I do not know if it’s possible but you may be able to take backups without openhab not running. Do the backuo cli commands use Java? Surely they will work before you have to resort back to an older backups and then you can update your OS to a newer one with Java 17 and load the backup. Best to spend the time moving forwards but I do not understand your situation like you do.

1 Like

Managed to do this. thank you so much.
I’m gonna write what I did down here to help other less-expert users like me.

I Run openHAB backup command on the installation which I accidentally upgraded. Even if the software wasn’t working the command did.

Exported the backup on my pc and went for a fresh openhabian installation.

Named the backup init.zip and dropped the file into the boot partition so that the backed up config would be automatically taken as the initial one into openHAB while installing.

Installation is up and running with OH version 4.1, with all the changes up to date.

1 Like

Unfortunately even if my mirror was still running on the old version, it had some problems booting. Otherwise it would have been a quick and easy solution.
Used the backup with a fresh install and everything is back up and running.

I’m gonna use your advice to keep me up to date with OH releases.
Thank you.

1 Like