Amazon Drive + rclone mount + rsync

Hi All,

I’m a question regarding the working of ACD+rclone+rsync.
I mounted a folder using the following command:

rclone mount --drive-use-trash amazon: /home/myuser/cloud/amazon

I can list and edit the files inside the created mountpoint and all works… but I don’t understand when a local change is pushed on remote system.

Is the file transfer to remote (amazon acd in my case) triggered on file changing or on file closing?

Can I modify the behavior in order to have a local cache and postpone the file transfer when the file descriptor has been closed by all applications?
(this behavior should make the rclone mount a little bit rsync-friendly).



Why are you using both rsync and rclone? Rclone is essentially rsync for the cloud, so you can use it directly:

rclone sync {local folder} amazon: --options
rclone move {local folder} amazon: --options
rclone copy {local folder} amazon: --options

Also, the rclone mount is still experimental and really should be used for “read-only” access at this time due to its current limitations.

You are right, vanilla rclone is the best choice but I’m trying to manage in a transparent way my multimedia folders (photos and videos). I already done an entire backup of my data using rclone sync (up 60gb).
I’m just asking how it works.



--drive-use-trash is a switch for Google Drive, not Amazon Cloud Drive. Fortunately, any deletes you do using rclone on ACD always go to Trash. If you want to recover or permanently delete something from ACD, you’ll have to use their web interface.

ACD only supports sequential writes - making some blatant assumptions here, but if rclone was uploading every time a non-sequential block was edited (ie: rsync doing it’s clever binary diff stuff) it would need to start uploading again from the beginning of the file each time a change occurred. So it’s likely waiting until all local changes are complete, and doing so at the kernel / fuse layer (not rclone code per-se). There’s also the --write-back-cache option, which would make your kernel buffer writes first, rather than passing them straight through to fuse/rclone block by block.

As you said though, vanilla rclone is still the better option. rclone copy --checksum is as close as you can get to rsync -auv without changes to how ACD works.