[SOLVED] Openhab 2.2 and upgrade to latest version 2.4

Hi,
I realised that I`m still running OH 2.2
Are there any known issues when upgrading to OH 2.4 ?
Is the latest version stable enough at the moment.

The latest stable release is 2.3.0

OH 2.4 is considered an unstable branch (also called Snapshot)

There is also another release called OH 2.4 Milestone (currently at M5). This is a pretty stable (testing) release of the OH2 distribution.

Personally, I use Snapshots all the time in my production system, upgrading them weekly (sometimes daily) to have and test the latest features.

Get 2.3.0 Stable from here: https://www.openhab.org/download/ (or the stable repo)
Get 2.4.0 Snapshot from here: https://ci.openhab.org/job/openHAB-Distribution/ (or the unstable repo)
Get 2.4.0 Milestone from here: https://ci.openhab.org/job/openhab2-release/ (or the testing repo)

I think that M5 is similar to Snapshot #1400 (not sure). It was build 19 d ago.

The latest Snapshot build as of this moment is: #1429 (it was build 3 hr 12 min ago)

1 Like

Briliant, thanks @Dim just updated by openhabian to stable 2.3.0 , everything works at the moment.

In terms of the system backup , whats the best way to attack it. Currently using RP3 with 32GB SD card.
Do I need to remove SD card from RP3 and clone it or is there any better way of doing this. I have spare identical 32GB SD card in cupboard.

1 Like

You can try the already prepared scripts for Amanda which are included in openHABian

read more here: https://github.com/openhab/openhabian/blob/master/docs/openhabian-amanda.md

Or you can simply use: openhab-cli backup [filename]
(afterwards, copy the backup file to your PC/NAS/other storage destination)

Cloning the SD Card is also a solution but involves downtime.

@Dim , masive thanks, backup created within two minute. Zip file is about 90MB I was expecting more knowing openhabian alone weights more. I will store it safely on my PC. Assuming I can delete this copy of my RP3 as soon is copied to my external PC or should this copy stay on RP3 too ?
Excuse my direct question but also how to prepare my spare SD card and preload it with latest backup. Is there any special process. Ideally at the end of it I need to swap cards over and test it quickly to ensure everything works when using my second SD card.

1 Like

You can delete it since you have copied over to your PC.
When the time comes (hopefully never), you will copy the backup file from the PC to the rPi3 and restore it (using openhab-cli restore [filename])

Clone the production SD Card to the spare SD Card to start with. Keep the regular backup files from the production SD Card on your PC.
When the time comes (hopefully never), replace production SD Card with spare SD Card, copy the latest backup file over to the rPi3 and restore it.

Thanks @Dim
Just to confirm - I can simply clone the production SD card by copying todays backup to new SD card ?
Hopefully I will get 3 years out of each card, I hope.

To clone the production to the spare, you need a tool like: https://sourceforge.net/projects/win32diskimager/ and a SD Card Reader on your PC.

The backup file that is created from openhab-cli is only containing openHAB related information. Nothing more.

The operating system (O/S) and its configs are not backed up from the openhab-cli (that’s why it’s only 70MB)

To do a full backup (O/S + OH2 + other stuff) => make an image of the entire SD Card.

Many thanks @Dim, so can`t avoid downtime , hopefully full clone of 32GB is not going to take all day.

1 Like

You will only have to do this once.
After the Spare has been prepared with the cloned image, you will only bring back the OH2 backup file and restore it.

Also, from what I remember, the imaging tool copies only the occupied space in the card (does not create a 32Gig image)

@Dim if I was to install fresh openhabian on this new backup SD card and then restore configs from todays backup would this give me the same result ? Instead of cloaning my exisiting SD as this will require some downtime. What do you think.

Almost the same.

openHABian is a set of scripts that run on top of Raspbian (Debian) O/S. It’s not an O/S in itself. It includes Raspbian in its image.

Some of the settings that you do directly on the O/S or via the openHABian tool will have to be redone if you deploy a vanilla openHABian image (for example: a java update or some other package update/upgrade)

If you clone your existing production SD Card, you will capture everything (up to the current moment).

So, you need to consider both O/S changes as well as OH2 changes to be backed up.

But yes: keep it simple: You can use a vanilla openHABian and restore the OH2 backup on it.

@Dim . I just been trying to backup entire SD using Win32 Disk Imager . However for some reason getting this error when hiting Read. Is this a common problem with SD`s

.SD%20error

I think that Google will help you more than me… I used it and I found:

https://sourceforge.net/p/win32diskimager/tickets/9/

Much appreciated. Thanks

1 Like

Also, here’s a simple tutorial for cloning, zipping, and restoring if interested. https://beebom.com/how-clone-raspberry-pi-sd-card-windows-linux-macos/

This is a very well written article.
I will be sure to bookmark it and come back to read more of your useful information. Thanks for the post.

Healthiest Fruits