Some stuff to read https://mariadb.com/kb/en/mariabackup/
I kind of found this thread looking for a way to mount a network path in HassOS.
The OP wanted to do pretty well what I want. Camera Storage on a NAS. In my case, it is OpenMediaVault and the setup has enough speed.
Some will cringe at this, but I have a few Windows machines, so it is CIFS, Has anyone got a realtively pain-free way to mount a CIFS folder in HassOS so it is accessible to Add-ons like MotionEye and possibly Plex?
I finally pieced together the steps required to mount samba and nfs devices in hassos running on a rasberry pi.
apk update
apk add cifs-utils
mkdir /mnt/backup
mount -t cifs -o username=supersexysysadmin,password=supersecretpassword //192.168.42.42/homeassistant /mnt/backup
You can add this to /etc/fstab
then run mount -a
but it doesnāt persist reboots so itās kind of pointless. The package installs donāt persist either, I assume itās a docker thing.
//192.168.42.42/homeassistant /mnt/backup cifs credentials=/root/.smbstreetcred,uid=8123,gid=8123 0 0
Hereās how to do it with nfs. My network share is on a freeNAS box and I had to specify the full remote path to mount it. I assume thatās a freeNAS default for nfs exports.
apk update
apk add nfs-utils
rpcbind
mount -t nfs 192.168.42.42:/mnt/Abyss/backups/homeassistant /mnt/backup
Hereās the āuselessā nfs entry for fstab.
192.168.42.42:/mnt/Abyss/backups/homeassistant /mnt/backup nfs rw 0 0
I spent several hours trying to get a working init script for rpcbind in OpenRC but gave up when I discovered the persistance problem. I can still use this for manual backups but I also want to store camera footage on my NAS. Does anyone know how to make docker persist these changes?
I tried to use this to save video to my NAS but when I add a mounted directory (smb or nfs) to allowlist_external_dirs
I get this error.
not a directory @ data['allowlist_external_dirs'][0]
I made sure the directory was mounted and writable. Local directories work fine here though.
Did you find a way to persist?
Iām thinking that if the Samba addon works, maybe the way to do it is via creating a addon like the Samba addon.
Use the ssh & webterminal addon. It has the ability to add packages on hass startup - you want cifs-utils from memory, and to rn commands on startup too (I gave the command above).
Actually I want rclone to mount the drive.
So I need FUSE to be installed in HASSIO.
Iāve done it using:
apk add --upgrade fuse
After that, Iāve been able to mount the google drive without problems.
Butā¦, every time I reboot I loose all of my changes.
Furthermore, after mounting the system under /media/gdrive I cannot see them inside the media browser:
File seen:
And in the media browser:
how is the drive mounted? The output of
mount|grep gdrive
myremote: on /media/gdrive type fuse.rclone (rw,nosuid,nodev,relatime,user_id=0,group_id=0)
However, I canāt access that from Home Assistant.
If I create a file manually, I can see from Home Assistant, but I canāt see the mounted information.
So, I am able to mount the samba share (Iām using hassio vm image). What I have to do now to persist it across reboots?