I am running HA on Docker, I configure it to backup daily and recently I notice that it is taking up 3GB for just 1 day.
After i SAMBA into it and take a look, it looks like this
and I can just keep clicking into the backup folder, it just seems to go on and on, like this
so… is it my configuration issue or it is suppose to look like that?
I just removed some old snapshot to free up some space, (7 days of snapshot was 22GB)
Appreciate someone can shed me some light!!
Updated with more information below:
HA Info:
HA Version: 0.110.3
OS: Ubuntu
Supervisor version: 224
Autobackup version by @jcwillox: 0.5.2
My database size it 827.15 MB, i use autobackup to keep track of the snapshots.
Your screenshot of snapshot seems like how it should work instead of mine,
which the backup folder another backup folder which loop for a ridiculous amount of time ( as shown below) and eat up a large amount of storage
That’s pretty broken, not sure how you got all those subdirectories, but there should only be *.tar files in the root /backup directory.
I don’t see any issue with your configuration.
I think it’s quite weird that every subdirectory is the same and that it appears to go on forever, so my guess is actually that somehow a directory junction (or hard link) has been used to create a loop. That is that /backup/backup actually links to /backup but the OS doesn’t perceive it that way and so it appears as infinite subdirectories.
To check this open the windows command prompt in the /backup directory and run the command dir, you looking for something saying <JUNCTION>.
You can try deleting anything that is not a *.tar file in the root /backup directory, and see if the problem persists (i.e. it’s still creating subfolders). It’s also worth checking the home assistant logs and supervisor logs around the time you take a snapshot. Are you running any other backup utilities that may be conflicting?
Great! so it was a circular link on the linux side, it’s weird that was even created, it couldn’t have been home assistant or any of its components, as they don’t have access to the /backup folder, so maybe the supervisor or an addon caused it.
Now I have another issue, after deleting the backup folders,
Supervisor > Snapshot still show there are 3 snapshots but in backup directory there’s only 1
Auto Backup shows a snapshot as monitored until it expires even if it’s deleted externally, you could manually edit/delete the file under /config/.storage/auto_backup.snapshot_expiry and restart.
As for the supervisor it creates the list of snapshots by reading from the /backup directory. There should be a reload button in the top right corner, otherwise a restart should fix it.
@kavierkoo I had a similar problem recently but it was with my config folder. I only discovered it after the Visual Studio Code plugin started pegging my i5 NUC CPU useage at 100%. Turned out that it was disappearing down the infinite plughole of the config folder enumerating files as it went! I couldn’t get rm -rf to remove the link, so I exported a backup and used 7-zip to delete it. Once I did a wipe & restore, it was fine.
However, on checking today I find that my backup folder has the same problem as you, but this time the rm -rf worked, but it is a strange problem!
@sota yea lol… When I run hassio directly on Ubuntu, I never have this issue,
It only happen after I dockerize it…
Are you running on linux? or Docker?
Let’s see if we have any similarity here.
I’m running it on Docker, and Addons are:
AdGuard Home
SSH & Web Terminal
Samba Share
HACS
Auto Backup
and few of frontend cards.
I use automation to snapshot daily 5 AM and keep for 7 days, and uses auto backup more insight info.
I’m running HA Supervised under Ubuntu Server 18.04 along with about 10 or 12 other containers under docker compose.
I noticed the problem because the NUCs fan was running flat-out after installing VS Code. Other than that, I have:
Appdaemon 4
ESPHome
Google Drive Backup which runs every night
Let’s Encrypt
MariaDB
Mosquitto Broker
Node-Red
SSH & Web Terminal
Samba
Zigbee2mqtt
I suspect that file corruption may be at the root of the problem. However, it’s almost impossible to prove so I guess I’ll just keep an eye on it for now. I am planning to move to Proxmox, so this may force me to get on with it.
Hmm, the common thing I guess was we both running HA Supervised with Docker on the same OS and version too.
and yea, we can only monitor it for now. Good info about Proxmox… but I think the dashboard not as elegant compare to HA (just my opinion)… I do use Netdata and customize my own small dashboard to monitor my webserver tho.