jcwillox / hassio-rclone-backup

Home Assistant addon to automatically sync backups to remote locations using Rclone
MIT License
123 stars 21 forks source link

[FR]: Add the option of mount folders #27

Closed McGiverGim closed 11 months ago

McGiverGim commented 1 year ago

Is your feature request related to a problem? Please describe.

I want to upload to Google Drive images/videos of my cameras as soon as they are taken. I want to mount the folder where the camera saves the files to a Google Drive folder.

Describe the solution you'd like

The possibility to use the mount command of rclone.

Describe alternatives you've considered

I tried several ways to upload files to Google Drive from Home Assistant without luck.

Additional context

None. Thanks!

jcwillox commented 1 year ago

I think you might be able to do that via the web UI, but it probably won't survive restarts. It might also be possible to do it via a job at startup (e.g. a job without a schedule), but I think it might block other jobs from running, so perhaps an option to make a startup job run in the background is needed.

jcwillox commented 1 year ago

Tested out mounting a directory with the following job config

- command: mount
  name: Mount Backups
  source: hassbackup:/
  extra_flags:
    - "--vfs-cache-mode=writes"
    - /share/google

Fails because fuse is missing, so somehow have to get that working inside the docker container, hopefully I can just install that into the container 🤞

McGiverGim commented 1 year ago

Hi! Thanks for looking at this. Maybe yes, the only thing needed is to have fuse at the container. I'm more a windows user, so I think I can't help too much with this...

a-wolter commented 1 year ago

I had the same Idea, to backup pictures from my phone encrypted to a cloudstorage. Since photosync doesn't support end-2-end enryption I also want to use this add-on to push it to a smb share which is a rclone mount :)

so +1 for this feature

cokeman0 commented 1 year ago

also +1 here..

agodet commented 1 year ago

same need. Adding "RUN apk add fuse" in the DockerFile will do the trick ?

2023/10/11 22:27:02 NOTICE: pcloud root '': --vfs-cache-mode writes or full is recommended for this remote as it can't stream 2023/10/11 22:27:02 mount FAILED: failed to mount FUSE fs: fusermount: exec: "fusermount": executable file not found in $PATH 2023/10/11 22:27:02 ERROR : rc: "mount/mount": error: failed to mount FUSE fs: fusermount: exec: "fusermount": executable file not found in $PATH

12koen commented 1 year ago

Would be great addition!

jcwillox commented 11 months ago

Released in https://github.com/jcwillox/hassio-rclone-backup/releases/tag/3.1.0 🎉

McGiverGim commented 11 months ago

Some instruction or document about this new feature?

Thanks for it! I'm going to test it.

McGiverGim commented 11 months ago

@jcwillox it seems something is missing. I think I've configured it properly (I'm not too sure because I don't know too much about rsync), but it shows this error:

2024/01/04 15:22:22 Fatal error: failed to mount FUSE fs: fusermount: exec: "fusermount3": executable file not found in $PATH

This issue/feature request is closed. Better open a new one?