Does sync make a local copy and then upload the file

A general question. I am running version v1.56.0 under linux and connecting to OneDrive

My steps:

% rclone --vfs-cache-mode writes mount "onedrive": ~/oneDrive

This mounts as expected in my home directory. Next I have a large directory tree (lets say 500GB) of videos files and directories. I want to have a backup of that directory tree on OneDrive.

I do this:

% cd ~Videos
% rclone sync "2018/" "~/oneDrive/Videos/2018/"

This brings the contents of directory 2018 and all its subdirectories to that mount point ~/oneDrive and eventually makes the files available in my OneDrive account in the cloud under Video. That is what I expect.

Observation: The rclone sync happens so fast that it must be making a local copy and then over the next day or so given my slow upload speeds pushes the data up to my OneDrive account.

Question: what happens to this local copy under the ~/onedrive mount point after it's been uploaded to OneDrive. Does the data expire after it has been uploaded or do I now have 2 copies on my local disk. I will not have enough disk space for 2 copies to continue this method. If I stop the first rclone mount process and umount ~/oneDrive the files are gone. How do I remove that extra copy under oneDrive without affecting the backup in the cloud. I think I was suppose to use rclone copy instead of rclone sync perhaps.

Hope this makes sense.

Thanks for any advice in advance


hello and welcome to the forum,

that is correct, as per the documentation
"write only and read/write files are buffered to disk first."

if you want to sync files from local to onedrive, then use rclone sync without rclone mount
rclone sync ~/Videos/2018 onedrive:Videos/2018
in this case, no need for rclone mount, no need for a buffer, no issue of running out of disk space.

Thank you. That makes sense.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.