Hello, I'm wondering if it is possible to connect two remote mounts via rclone so that one sees the other in its filesystem. For example, I want to make my Google Drive available to a remote SFTP mount. I mounted the SFTP remote first, and then tried to mount Google Drive in a directory within that SFTP remote but it didn't work. I didn't get an error but the folders weren't there. Any ideas? Is this possible?
I am trying to relay files from one server to the other without having to move them to my relay server and then move them again. If they could just go by themselves, that'd be great.
What is your rclone version (output from rclone version)
rclone v1.51.0
Which OS you are using and how many bits (eg Windows 7, 64 bit)
Ubuntu 20.04 Server
Which cloud storage system are you using? (eg Google Drive)
SFTP and Google Drive
Command?
rclone mount sftp:/remote/dir /home/dir1/
then
rclone mount drive:/remote/dir /home/dir1/dir2
I wouldn't do what you're asking but you can use bind mounts. You can end up with doing unexpected things (putting things in the wrong mounts) Perhaps read only mounts would be better.
root@dell-rob:~# mkdir a
root@dell-rob:~# mkdir b
root@dell-rob:~# sudo rclone mount zonegd: a &
[1] 31121
root@dell-rob:~# sudo rclone mount zonegd: b &
[2] 31135
root@dell-rob:~#
root@dell-rob:~# mkdir dir1
root@dell-rob:~# mount --bind a dir1
root@dell-rob:~# mkdir dir1/dir2 && mount --bind b dir1/dir2
root@dell-rob:~# ls dir1
cloudp cloudp-bkup dir2
root@dell-rob:~# cd dir1/
root@dell-rob:~/dir1# ls dir2
cloudp cloudp-bkup dir2
" A bind mount is an alternate view of a directory tree. Classically, mounting creates a view of a storage device as a directory tree. A bind mount instead takes an existing directory tree and replicates it under a different point. The directories and files in the bind mount are the same as the original. Any modification on one side is immediately reflected on the other side, since the two views show the same data."
On second thought (sorry for the double post), I don't think union is what I wanted, or maybe I've just misconfigured it.
Basically I'm trying to move files and folders automatically from one remote to another. Is there a watch folder functionality or something that could accomplish this?
Could more than one copy command be running at the same time for the same folder? Any idea about the best way to go about it? A Cron Job?
Let's say I setup a rclone copy command to run on the same folder every 10 minutes, it would only move new files and folders within it? And not conflict with any of the other rclone copy commands?