External mount for /backup đź’ľ

I’m looking for a solution to get something external (usb drive, smb, …) mounted for my /backup directory. Problem is that there isn’t enough space anymore on the internal drive (which can’t be exchanged because it’s soldered onto the main board) to successfully create a new full backup.

I’m on a supervised install so I have full control on the OS level.

1 Like

You could have a look at hassio-addons/samba-backup at 1ffffaaa1df3a954e04cc13cf06329203ede4b2d · thomasmauerer/hassio-addons · GitHub I use it to backup my backups to my Synology NAS.

Thank you but I think this doesn’t help. If I understand right the backups are not directly created on the smb share but instead created locally and then synced over to a smb share. For me that’s not helpful because I’m not able to create a backup locally because there is not enough space left.

This is true. Well can you take a different approach? Try to shrink ha database, remove unused software etc. Check recorder.
I’m not sure that you can mount another drive on /backup because it’s already mounted probably on /. But I might be wrong here.

Tried all of this already included deleting addons and stuff (I only need the influxdb addon+data actually) but when doing the backup it just fails after hours because still running out of local disk space.

I would need to dive into the docker for this - I remember some one did this already (I think with HaOS and not supervised) but I can’t find the reference anymore (was here in the forums…)

Maybe you can connect external USB or ssd and rsync home assistant and it’s subdirectories.

I think that’s not possible because HA doesn’t allow to mount any external drive afaik. Also I want to restore my backup in the end on another machine - not sure how that could even work when I don’t do a backup initially…

This might help

I went thru the page from top to bottom but didn’t gain any new insights - anything in particular that could help in my case?

I was looking at chapter external data disk.
I don’t understand one thing. You said that you have os level access but still can’t do anything about the problem you are facing.

I think this is a question that should be turned into a feature request. Because it is kind of weird that backups need to be stored on the same medium we are trying to protect from failure. If you get the sense the SD card is about to fail, then your only hope is to create the backup on it before moving it to a safe place?

1 Like

It doesn’t have to be stored on the same media but it is created on the same media. The reason for that is probably because backup file is just a *.tar file with all the files and directories joint in one big file. If you do a network backup while creating tar file is might end up in broken backup in my opinion.

1 Like

That only works if one is running HaOS if I get that right - it’s not supported in supervised or other installation modes.

Well I have debian with supervised install. I went to check it over the app and I have this option. The only thing to do will be to go to mount externall usb or hdd. I can’t check that because I’m away from my server.

1 Like

A couple of request in this “direction” exist already:

https://community.home-assistant.io/t/nas-mount-on-hass-os/

https://community.home-assistant.io/t/hassio-mount-external-drive

But if it cannot be stored on the same media first right now, it cannot be created at all. That is the (bad) point.

So its like when you go to a bartender and say: This guy with Corona sneezed all over my glass, how can I drink safely now? And then the bartender says: Well, if you poor out your drink bottle in your glass, Il will get you a fresh glass and then you can poor the contents of your filthy glass over in the clean one. :wink:

1 Like

Those feature requests would probably solve it, but do not specify as good a reason to do so in my opinion.

Indeed. That’s why I said “direction” :wink:

It would be really great to have the option to backup “directly” to another disk than the internal (like a attached usb drive or a network drive) :floppy_disk:

Certainly better option that this here as a backup target :laughing:

image

dead end:

image