Backup & restore questions

Hi everybody.
I spend a lot of time with my openhab and now is time to create backup :slightly_smiling_face: But I have some questoins:

  1. Can I create backup on hassle-free OH setup (ready to use SD-card image) and resore it on openhub launched on original RasberryPI OS? I did that, and get failed.
  2. Is the “openhab-cli backup” backups raspberry config (network interfaces, /etc/modules, /boot/config.txt…)
  3. Openhub don’t stop when I use command “sudo openhab-cli stop” it stops and starts immidiately. Is it normal?

Hi @Papay_P,

It’s not clear to me if you are using openHAB or openHABian, but “openhab-cli backup”, just backs up the openHAB/openHABian configuration, it doesn’t backup the OS.

OpenHABian has AMANDA built-in, and AMANDA should be able to back the entire PI, including the openHAB/openHABian configuration. (You can install AMANDA on a non-openHABian system as well.).

If you are looking to create a backup to an actual image file (ready to use SD-card image), I don’t know what solution you’d use. I would think a full backup of the Pi using AMANDA would suffice though. You’d have a few extra steps, but it shouldn’t be bad for the occasional restoration.


I have never seen anyone using openhab-cli stop.
You would be using ssh connection and:
sudo systemctl stop openhab2.service
sudo systemctl start openhab2.service
sudo systemctl restart openhab2.service (this will stop and restart openhab).

  1. that does not make sense. You cannot restore an image (to contain the OS) on top of an OS.
    Unless you meant to say you use openhab-cli backup but as @Burzin_Sumariwalla correctly noted, that is not a OS backup it just exports the openHAB config.
  2. No
    You should setup Amanda (openhabian-config option 52).
    Yes it can create a full system backup/image and/or backup specified directories including those to contain openHAB config.