Synchronize replaced files to remote destination

I just have a quick question regarding the sync task. I have files on my local system which are then synchronized to a remote target. My goal is to have the remote target always exactly the same as the local one.

What happens if I replace a file on the local target (the file has a different size but is named exactly the same)?

Will the old one be deleted on the remote host and the new one synchronized?

Because I read that in the documentaries:

Note that files in the destination won't be deleted if there were any errors at any point. Duplicate objects (files with the same name, on those providers that support it) are also not yet handled.

How can I implement my desired scenario?

Thanks for help :slight_smile:

after running rclone sync source destination your destination will be exactly the same as source - they will be in sync... New files will be copied, changed files will be replaced, not existing files will be deleted from destination.

This is safety measure. If there are errors it is better not to delete anything. As for duplicates it is only specific to very few remotes where files with the same names are allowed, e.g. Google Drive or Mega. Duplicates create ambiguous situation rclone can't resolve. In general you should avoid duplicates unless you have very specific requirement. Rclone can help you with it, see rclone dedupe.

1 Like

Thank you for your answer. So duplicates only exist if he copies the new replaced file to the remote and leaves the old one there which was replaced on the local device.

But as I understand it, rclone should synchronize my replaced files from local to remote and delete the old ones right?

Maybe I should check it a quick test.

rclone will not create any duplicates unless some erroneous situation.

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