I agree and there is also an addon called rclone which can save to a lot of destination, including the local file system, but USB is not mentioned, so if you can not mount the USB device, then you are still no closer to a solution.
I mounted the USB device without any problem by adding a udev rule ([SOLVED] Mount USB drive in Hassio to be used on the Media Folder with udev customization) as per the configuration docs. Ironically you have to use a USB device to do it
I’ll have a look at ‘rclone’, the USB device appears in the media folder so I wonder if rclone can access it once the udev rule has been added ?
Rclone doesn’t seem to be able to see the USB device As far as I can see this is probably because addons run in their own containers, is this correct ?
Adding ns are their own containers.
I thought the backup folder was shared though, like the config folder, but I might b wrong there.
The backup folder must be shared as rclone has access to that, the media folder, which is where the USB device is mounted by the udev rule, obviously isn’t.
Looking at the udev rule that I added, it specifies :
# Determine the mount point
ENV{mount_point}="/mnt/data/supervisor/media/%E{dir_name}"
…which could presumably be changed to a folder that is shared, e.g. backup. Are there any guidelines regarding the use of shared folders, I assume mounting the USB device in the backup folder would be frowned upon ?
Tried various options, the only place I can mount the USB device is in the media folder, which isn’t shared with addons. Changing the mount point in the udev spec to any other folders doesn’t work.
Wally - Many thanks for your assistance, much appreciated.
A final note - The reason I was trying to copy the backups to a USB device is for consistency. I don’t have a NAS or use cloud storage so I use ‘Image Backup’ to create a backup image on a USB device plugged into each of the other Raspberry Pis I have in my home system. This can’t be done with Home Assistant OS on the Raspberry Pi. I eventually gave up with this approach and found I can pull the backups off Home Assistant using ‘rsync’ and SSH on one of the other Raspberry Pis, saving the backups to its USB device. Not ideal, but it does give me an automatic copy of the backups in case Home Assistant fails.
Totally untested and highly dependent on your hardware, but here goes:
Most routers have a USB port which can be used for shared storage on the network. Can’t you plug in the USB or a spare SSD and use that as a poor man’s NAS without having to have another Pi dedicated for this?
Once that’s done, all you’d need to do is configure network storage using CIFS/NFS and add it as a backup location.
Hi ShadowFist, thanks for your suggestion. Yes, I already have a memory stick plugged into my ISPs router, it’s visible to the whole network and used by the family to transfer photos, videos, PDFs and anything else that needs to be moved between mobile devices and/or computers. It works very well for that purpose but as everyone has read/write access it wouldn’t be suitable for backups.
My ‘IOT’ network is a separate isolated (from the family) subnet that has several Raspberry Pis and numerous Arduinos and other devices attached, mostly using MQTT. I simply added a crontab and bash script to the Raspberry Pi that runs the central MQTT broker, NodeRED and other central tasks.
The fact that I haven’t needed to use any further HA addons to achieve what I required is also a bonus