Need help moving the KAR folder away from userdata folder

  • Platform information:
    • Hardware: RPi 4
    • OS: Openhabian
    • Java Runtime Environment: Dunno - what came in the Openhabian package
    • openHAB version: 4.2.1

OK, I have migrated my old OpenHAB 2.x installation to an RPi 4 - fresh install of Openhabian and restore from .zip backup. I think I may have made a mistake somewhere - maybe when running the apt upgrade manually from the console(?) - and now the KAR folder is in my userdata folder = included in my openhab-cli backup job, giving a slow backup job with a massive zip file size as result.

Searching through the forum I see that others have had the same issue here and there but I haven’t found a solution. Nothing is broken or not functional, but I’m guessing this isn’t the intended configuration and I’m looking for some guidance to get this sorted.

I’m not very Linux or code savvy and totally depend on the kindness of you guys here in the forum :slight_smile:

Any help will be appreciated. Thanks

You should not do manual apt updates, let openHABian do it’s job!
Simply ssh into your server, cd into the userdata folder and remove the file (rm). But I don’t think it is included in the backup, did you check the content of the zip file ?

Thanks for the quick reply. Yes, the userdata is in the zip, kar folder + content included.

I didn’t know updates were automatic and I have always done the apt upgrade manually. I didn’t remove the kar folder or anything within it since someone said in a post that something broke when doing this. Is it safe to move the kar folder, or just the content within it?

I’ve looked at my userdata folder and while I have a kar folder, it’s empty.

What is actually in this file for you? What are the dates on these files or the versions of these files?

That’s kind of the point of backup though. Make a backup of what you have now (even just tar up the whole userdata folder) remove the contents of the kar folder and see if OH works. If it does hurray! If not you can restore it and move on to other troubleshooting steps.

OK, thanks - I’ll give it a go deleting. The kar folder only contains one folder

  • openhab-addons-4.2.1

Under that one, there are a lot of folders…

The addon folder is from Sept 27, last Friday. I was in the process of manually restoring everything that hadn’t automatically started - adding things etc. I had a lot of KAR warnings in the log and found a post somewhere advising to reinstall the add-ons. What I did was to remove either MQTT or Z-wave binding (not sure) and reinstalled it through UI. But, I also did an apt-get update/upgrade in console since I’ve always done that when the console have said there are apt updates available. Maybe I shouldn’t have. I did a lot last friday so it’s hard to know exactly what lead to the addons folder being added in the kar folder.

There’s no problem with the backup. It does it’s job - it’s just that with (currently) 0,5 gig+ per backup, the disk gets filled-up real quick. If I add more addons, how will this affect the backup size?

Thanks guys. Backup size dropped from 0,5 Gb to 700 Kb - all seems to work so far after a reboot… Let’s hop it stays that way… I’ll assume all components auto-update from now on :slight_smile:

Normally that’s not a bad idea and this kar folder issue isn’t related to the apt upgrade. It’s something to do with the restore performed.

That’s not really what @hmerk said or at least not what he meant. Your system will not auto update. You indeed need to tell it to update.

But if you are running openHABian, it’s always far better to do the updates through openhabian-config instead of doing it yourself (e.g. running sudo apt update && sudo apt upgrade on the command line). That tool will often perform extra steps but even if it doesn’t, by using the tool we can know exactly what commands were run and in what order and a host of other things that might be important.

So please do continue to initiate upgrades to packages as they come up. Just use openhabian-conf to do it. And also alway be prepared for something to break when performing an upgrade.

Thanks - I’ll use that tool from now on.
Yes, a restore is probably never 100% smooth.
Thanks for the help!