Easy move from Pi Zero to Pi 3

After one happy year with openhab on my Pi Zero , I would like to move to a Pi 3 B+.
Is there an easy way to transfer the setup to the new Pi.
I have installed the basic system and all the openhab components I used to have.
Now I would like to copy just a directory and the everything should work as before.
Is this possible ?
If yes, what are the directories to copy ?

Make a backup using

openhab-cli backup

Transfer this backup zip file to your PC. Install and start fresh OH image on new RPI then place the backup zip in /var/lib/openha2/backups

Stop OH with sudo systemctl stop openhab2.service

then restore the backup with

openhab-cli restore /var/lib/openhab2/backups

then restart with

sudo systemctl start openhab2.service

This will backup /etc/openhab2/ and /var/lib/openhab2/
This way, the information about installed addons is backuped, but not the addons itself, so when installing openhab2 new, the actual version of the bindings will be installed.
The only things to backup in addition, are the manually installed addons, if you have any.

I you are moving from Pi to Pi, just put your sim card on the Pi3. It should work.

1 Like

Going from Pi Zero to Pi 3, wasn’t sure about differences so took the safe route. Worst case the OP can use the same card and has a backup.:wink:

@mikeww1 make a backup, using the steps above or some other way, on a regular basis (once a month or more) and anytime you make big changes to your server. It’s also a good idea to keep a current backup as well as several older backups in the event of an SD card starting to fail. Restoring a backup from a corrupted SD card may or may not work, play it safe and keep a few older backups.

Thank you for the reply. I tried to put the sim card from the zero to the 3 first, but it does not work.
The Pi 3 does not boot with the zero card.

Pi zero was still 32 bit iirc. Moving sd card won’t work.
As suggested, backup and restore