If this post actually belongs in the “Installation” category, I apologize and ask that it be moved.
I’m planning to upgrade my OpenHABian from Bullseye to Bookworm using a fresh install (as dist-upgrade is not recommended). Additionally, I want to switch from OpenHAB Milestone(which I switched to in order to be able to use a device) to the stable branch during this process.
Current System:
OpenHABian (Debian Bullseye)
OpenHAB (Milestone build)
Zigbee2MQTT
Daily Amanda backups (using Samba shares)
MQTT broker runs on a separate machine
Upgrade Plan:
Fresh install of OpenHABian Bookworm
Before the fresh install, backup:
# Creates full OpenHAB backup including configurations, userdata, persistence in /var/lib/openhab/backups/
sudo openhab-cli backup
# Zigbee2MQTT data
sudo tar -czf zigbee2mqtt.tar.gz /opt/zigbee2mqtt/data
# System configs needed for Amanda
sudo tar -czf configs.tar.gz \
/etc/samba \
/etc/network \
/etc/hostname \
/etc/hosts \
/etc/fstab
Questions:
How do I properly switch from Milestone to stable branch during the upgrade?
Are there any known incompatibilities when restoring an openHAB backup from a Milestone system to stable?
What’s the correct order to restore components after the fresh install, considering the branch change?
How do I ensure my Amanda backup system works correctly after the upgrade?
How do I make sure that I haven’t forgotten a service or something similar?
When you first set up openHABian I believe one of the things you can put into a text file in the boot partition is the repo you want to install OH from. Choose release. Details should be in the openHABian docs. You should be able to put your backup file there too and openHABian will do the restore as part of the initial installation and configuration.
Right now the release and milestone is exactly the same so now a good time to do it.
Until the first milestone for OH 5 is released, they are identical. So at least through January there will be no problems.
Oh, no please. Do not EVER forward old configuration files to your new OS.
Setup Amanda, Samba etc. from scratch.
Use the new system’s defaults and adapt if needed.
I did an “Update System” within openhabian-config which also does an “Install openHAB” but I did that too just to make sure.
Checked again right now:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
openhab-addons is already the newest version (4.3.0-1).
openhab is already the newest version (4.3.0-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
OK
I installed openhabian with Raspberry Pi Imager.
When I try to restore I get the error from above.
Make sure you are running this command from the folder where backup.zip is located or use the full path to the file on your command.
The file is a zip file so you can open it up and see what it looks like. zip -T backup.zip will test the entegrity of the zip file. unzxip -l backup.zip will list all the files in the zip without extracting everything. You should see most of what’s in /var/lib/openhab and /etc/openhab in that file.