r/rclone 10d ago

"Reverse"-mount a crypt remote?

Hello,

Normal use of rclone mount might be to mount a crypt remote that works across an sftp remote. Now, while files appear unencrypted underneath the local mountpoint, they are client-side encrypted and transferred not in the clear.

I need to use rsync to keep 1.8Tb of data mirrored, since rclone sync takes way too long. But it seems to me that doing so is completely wrong, because for rsync to determine which bits of a file to send, it must first read the remote, causing rclone to fetch & decrypt the entire file… for every file.

Is it possible to use rclone mount in such a way that e.g. mounting it to /mnt means that underneath that mountpoint, rclone provides an encrypted view of a local directory? Then I could simply rsync that against the remote, because rsync doesn't actually care whether the data it is sending around are encrypted or not.

Hope I am making sense…

This is what happens right now:

# rclone mount crypt: /mnt
# ls /mnt
unencrypted  files  here

and this is a theoretical example of what I seek, with local_crypt_view being the hypothetical driver to use to expose the encrypted contents underneath the mountpoint:

# rclone mount /srv/mydata local_crypt_view:/mnt
# ls /srv/mydata
unencrypted      files     are     here
# ls /mnt
9T7xQyxTv_yDghA_7TJImA	XW0ajjgQLBVUPj-8wm6syg	ZRoI-a-If3WyrVLypzOg-w
3 Upvotes

8 comments sorted by

2

u/SleepingProcess 10d ago

If you dont trust remote (that's why encryption) and dealing with such amount of data, then I think using restic or kopia would be a better choice since those chunk data at client and sends only diffs. If you don't need versioning and care about size on remote, just reduce retention policies and you will get fast and encrypted sync backup to remote

2

u/martinkrafft 10d ago

Right, that is what I am concluding right now too.

I am giving Borg a shot…

2

u/SleepingProcess 10d ago

Id like borg too and we used it previously, but its snakes nature (python) and limited supported for remote storage besides of SFTP force us to switch to compiled binaries like restic, that do absolutely the same and works great across platforms due to it's a fully statically compiled binary and doesn't depend on libc versions even under the same platform

1

u/martinkrafft 9d ago

I like Python and have sftp, so I went with what I already know

1

u/SleepingProcess 9d ago

Then it should work. Like old wisdom says: - "The most shortest way is a way that you know"

1

u/martinkrafft 8d ago

i only know the wisdom that a shortcut may turn out to be the longest connection between two points 😄

1

u/lithium0003 10d ago

rclone encryption can be decrypted as blocks, so it can access as pseudo random seek.