Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addons storing their data in the config root instead of the addons directory #112

Open
phdonnelly opened this issue May 16, 2022 · 3 comments
Labels
question Further information is requested

Comments

@phdonnelly
Copy link

Hi,

Thanks for creating addons for all these projects; I've recently installed some and run into an issue where my backup size increased by quite a lot, and even when I exclude the add-ons form the backup the size is still large.

I took a quick look and the addons seem to be storing all their configuration files in the "/config" directory, which maps to "/usr/share/hassio/homeassistant" and I believe they should be storing this data in the "/data" directory, which maps to "/usr/share/hassio/addons/data/". It looks like all the built-in addons behave this way.

This may also explain why some of the folders specified in "backup_exclude" in the config.json are still backed up, because home assistant is expecting to exclude them from the addon directory, and not the main config file.

Any chance of updating your config files to use the /data directory? I can probably assist in a PR for the ones I use.

@phdonnelly
Copy link
Author

phdonnelly commented May 16, 2022

Actually looking at the dockerfiles I see you have a comment:

# use /data instead of /config for hass.io environment

But the actual sed command uses /config/ instead of /data for the directory; were there issues running from the /data directory?

@petersendev petersendev added the question Further information is requested label May 17, 2022
@petersendev
Copy link
Owner

So.. the main problem is, that most of all the images expect one location for all the config and data without a possibility to separate that.

As you said, the data folder may be excluded in backup - but we (or at least I) don't ever want to exclude the config files needed to get it running again. One could argue about all the database files and other stuff, but since the software (or at least base images) only expect one location, not so much I can do there.

I admit that my images are definitively created with the least amount of work or obstacles in mind.

Of course, if you find cases where the separation is possible I am always open for PRs.

@phdonnelly
Copy link
Author

What about using symlinks to manually exclude the larger directories that only store data that can be recreated?

I created a quick PR that tweaks the radarr and sonarr docker containers to move the large directories out of /config and into /data and symlink them. It's not really pretty but it seems to work for my tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants