sabeechen / hassio-google-drive-backup

Automatically create and sync Home Assistant backups into Google Drive
MIT License
3.11k stars 189 forks source link

Backup size went from 284MB 1 week ago to 2.3GB today. #810

Closed jamieFL closed 1 year ago

jamieFL commented 1 year ago

Hello,

This is my first time asking for help on Git. Last week, my backup was 284.6 MB and this morning's was 2.3 GB. This week I've been working on Frigate, which has had me perplexed because it will not connect to my MQTT Server. I also installed the Deepstack and Double Take add-ons, which have been running (Out of habit I checked start on boot).

Even though the Frigate add-on has not started, there have been a lot of additions to the logs. Could this be it?

How do I track down and rectify this? I do not want to back up needless data.

sabeechen commented 1 year ago

Home Assistant's architecture and backup format makes this a little difficult to do, buts its not too bad. Here is some guidance.

If you click on the addon in the web-ui, it will show you approximately how much space is used for each addon in the backup. This only works for addons though.

The most sure-fire way is to download the backup to your computer and open it with something like 7-Zip, or your compression utility of choice. Inside of the the backup (a .tar file) you'll find more compressed archives (.tar.gz files), one for each folder and one for each addon. The files will have somewhat obscure names, but you can usually infer what they are, for example:

This should indicate which thing in Home Assistant is bulking up the backup. But what to do from there? If an addon is the cause, how to fix it will depend on the addon because Home Assistant doesn't let you directly modify the addon's file system. If a folder is the cause, you should be able to further extract the folder's compressed archive and view the files inside. You could then use an addon that lets you mess with Home Assistant's files, I recommend the "File editor" addon.

Special note: If you protect your backup with a password, Home Assistant uses a very esoteric encryption scheme and the only way I'm aware of to get inside the inner compressed archives is to run this command line utility I wrote to decrypt them.

sabeechen commented 1 year ago

I'm going to close this issue for now, but if you think there is something else I can help with please reopen and let me know.