Skip to content

Instantly share code, notes, and snippets.

@dbiesecke
Created September 10, 2022 16:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dbiesecke/607fade267de176df5c073e767592064 to your computer and use it in GitHub Desktop.
Save dbiesecke/607fade267de176df5c073e767592064 to your computer and use it in GitHub Desktop.
Rclone auto mount + populate filesystem

Automount rclone

==========

Example invocation afuseusing sshfs:

`afuse -o mount_template="sshfs %r:/ %m" \
        -o unmount_template="fusermount -u -z %m" \
           mountpoint/`

Now try ls mountpoint/user@host/.

Rclone + afuse

#fusermount -u -z /remote
# umount /remote

export RCLONE_CONFIG=/etc/rclone/rclone.conf
afuse -o populate_root_command="rclone listremotes | sed -r "s/://g" " \
  -o mount_template="mount.rclone -o allow_other -o uid=1000 -o gid=1000 -o vfs-cache-mode=off %r:/ %m" \
  -o unmount_template="fusermount -u -z %m" /remote

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment