How thorough is openhab-cli backup?

  • Platform information:
    • Hardware:Orangepi 3 LTS
    • OS: Armbian
    • Java Runtime Environment: 17
    • openHAB version: 4.3.5

The Schedule stopped working few versions ago, it only shows as blank space and a jaxrs error in the logs.

2025-05-10 07:55:38.075 [ERROR] [rg.apache.cxf.jaxrs.utils.JAXRSUtils] - Problem with writing the data, class java.util.ImmutableCollections$ListN, ContentType: application/json

I have failed to find the root cause for this error. I am now considering a re-install of Openhab to remedy the problem. I have a very large Openhab install which I do not wish to recreate. It is several days of work. Therefore I would like to backup everything and restore them from the backup. Not having done this earilier I am worried I would anyway lose a lot of data.

How thorough is the openhab-cli backup? What exactly does it backup and what not? I would like to understand what I am doing before wiping my install.

First things first: Did you check if the file system

  • is writable for the backup user and
  • has sufficient space for the backup?

openhab-cli backup will create a zip file, containing a complete copy of $OPENHAB_CONF (most likely /etc/openhab/) and parts of $OPENHAB_USERDATA (/var/lib/openhab/), at least jsondb/, etc/ and config/(? not sure about the exact name). if using the --full option, also cache/, temp/ and persistence/ will be saved, which will increase the the zip file size most likely by factor 5 to 10.

The default path to the zip file is $OPENHAB_USERDATA/backup/ (or maybe backups…).

1 Like

I’ve found openhab-cli backup captures everything required to restore the system with the exception of the /usr/share/openhab/addons/ directory. The only reason this comes up for me is that’s where I keep mariadb-java-client for my persistence setup.

1 Like

I’ll only add that third party stuff is not included in the openhab backup. So mosquito, influxdb, mariadb, grafana, node red, etc would need to be separately backed up and restored.

2 Likes