"Not a directory" error with allowlist_external_dirs and /backup

Hi there!

I am running HA OS.

I wanted to see the database size and backup folder size on my dashboard.
I managed to get the file size integration to work by adding /config directory to allowlist_external_dirs and then adding the Filesize integration and entering /config/home-assistant_v2.db.

Then I tried to add the Folder integration to watch the size of the /backup directory.
But when I try to add /backup to the allowlist_external_dirs and do a configuration check, I get an error.

Not a directory @ data[‘allowlist_external_dirs’][1]

Here is my allowlist entry:

# Allow filesize and folder size access
homeassistant:
  allowlist_external_dirs:
    - /config
    - /backup

What am I doing wrong?

To be frank, I do not really grasp why we need the allowlist in the first place.

I found several topics that are similar but I did not find an answer how to solve this.
Sorry if it has been answered somewhere.

have you tried with

whitelist_external_dirs

instead of allowlist

Never mind, i’ve tried with both and various /folders , below /config i can “apply” whitelist_external_dirs … but not sensor: folder | folder: /backup … however i dont need it as i have Samba integration, and control my backups there ( they actually don’t fill so much anymore, about 1 GB in 3 month, and no reason to “store” for longer periods actually, considering the rapid changes HA is going through lately )

I would just like to see the size quickly and how it develops. Is there another way to do this? What am I missing?

are you talking about the backups, HA does, prior to installing new “versions” ?

  1. they are visible in /Settings/system/ backups
  2. they are visible in add-on File_Editor ( un-tick " Enforce Basepath" in settings for file-editor ) , and you have access to the whole OS / ( including /backup )
  3. they are visible on any devices, if you Install add-on Samba_Share

Sure they are visible on the backups page, but I would like to have a sensor telling me the total size of the folder. That would allow me to also see historical values.

I am not using the file editor add-on or samba share. I am duplicating them by fetching them with SFTP on another machine. But that is beside the point. I would like a sensor recording the size. It must be possible…?

I now think that the backup directory is not available to the “home assistant context”, so I quess this is impossible, am I right?

It is possible. Somehow.

They seem to be running supervised version. I am running HA OS. They have a different backup system under the hood as far as I know.