Hi there,
I want to set up my rclone system like described below and I am not sure how to go about it effectively.
Server A. a storage server behind a NAT firewall that I do not want to remove. I don't want to expose this server to the world wide web. Has good download rate but poor upload network rate.
Server B. a intermediate server or caching server that acts like temporary fast storage. Has excellent upload and download rate. It's only exposure to the internet is ssh.
Client C. the client or user of the system.
Now, to get this working, I though of a solution in which I make A connect via ssh to B and open a reverse connection like so:
(localhost would be A's localhost)
ssh -R 10022:localhost:22 B --vfs-cache-mode full
Now, I could of course then have C connect to port 10022 on B in order to connect to A all via ssh/sftp/scp. However, I want B to act as a cache, so I don't want a direct connection between C and A.
Thus, I decided to configure A as a sftp
remote on B, and then mount
A to a folder on B.
rclone mount A:/folder /folderA --vfs-cache-mode full
And as a last step, I would configure B as a sftp
remote on C and then mount
folderA on C.
rclone mount B:/folderA Z: --vfs-cache-mode full
This works quite well after I activated vfs cache mode.
However, I am wondering, can I improve on this somehow? It feels a bit overly complex.
I also would like Z: to be accessible when I am without internet, I want it to use the VFS. It seems to do so, but only after trying overly hard on establishing an internet connection.
All input is welcome!
Follow-up:
Something is not set up right I think, because if I close the rclone session on C while the rclone session on B is uploading, I get the same error over and over:
2021/12/18 22:40:02 INFO : test-file-1.mkv: vfs cache: downloader: error count now 13: vfs reader: failed to write to cache file: Open failed: file does not exist
2021/12/18 22:40:02 ERROR : Documents/test-file-1.mkv: vfs cache: failed to download: vfs reader: failed to write to cache file: Open failed: file does not exist