Team,
To keep track of where diskspace is being used I wanted to measure the size of local HA backups.
After a LOT of research I found that the HA “local” backups are stored in the home assistant OS_supervisor container, folder /data/backup.
Wonderfull.
The following command gives me the folder-size in GB:
du -s /data/backup | awk '{print int($1 / 1024 / 1024) }'
However, the “homeassistant” docker container is where command_line entries are executed. This container:
- Does not have access to the supervisor /data/backup folder
- Does not have docker cli installed
The docker command to get the foldersize from the supervisor container:
docker exec -it hassio_supervisor sh -c "echo \$(du -s /data/backup | awk '{print int(\$1 / 1024 / 1024) }') GB"
did not work as a command_line but only in an SSH session.
Ideally: have 3 sensors indicating the backup size of local-files/external-nas/nabucasa-cloud.
Do you have any idea how I could get the size of the supervisor/data/backup folder?
Cheers!
DJ