I found this sufficiently annoying that I edited the backup script at /usr/share/openhab2/runtime/bin/backup to make it remove the cache and tmp temporary directories before zipping. Given I want to keep months of backups, just in case, having 100MB each time was not fantastic…
Hi all, sorry intermittent access to internet at the moment until mid-august.
It’s true that the intention was to keep an exact copy of the state of openHAB’s dynamic files. However, as @dan12345 has pointed out this isn’t a great idea if someone wants to do regular backups of their configuration (we should all want that right?).
I think the best solution would be to add a --full flag. If used, the userdata/tmp/ and /userdata/cache files will not be deleted within the zip. On the other hand, if the default function should be the same as it is now, then a --nocache flag could be implemented?
I have to agree with @dan12345 here, this is an irritating behaviour. I think the default should be to not include tmp and cache in the backup. Isn’t everything in those folders recreated upon startup of OH anyway?
Anyway, did anyone start any work on changing this? No matter what is default, there ought to be a choice whether to include tmp and cache or not
I got a question regarding openhab-cli backup and restore, I recently upgrade my rpi from 3B to 4B with openhab-cli backup & restore, restore process is smooth, everything works as expect, It only come to me one issue recently. I can’t manually upgrade addon. (put jar to usr/share/openhab2/addons)
I got few binding were installed by manual (put jar to usr/share/openhab2/addons),
after restore on 4B, binding is working, but it’s not inside folder usr/share/openhab2/addons, when I put a new version of jar inside addons folder, there is error, bundle:list shows new jar is installed, but old bundle still exist, I can manually uninstall the jar with bundle:uninstall, but I would like to do a backup with bundle before I remove, so in case anything went wrong, I can restore back, anyone know where that jar located? I also tried /var/lib/openhab2/tmp/mvn/org/openhab/binding, it’s also not there, please kindly advise me if you know. thank you.
It’s not located anywhere really. It’s embedded inside the kar files and it’s “installed” into the karaf container. You can’t just find and delete the jar file. You have to remove it which is probably best done using bundle:uninstall. For some reason on the restore your add-ons that were manually installed to the addons folder got installed “normally”.