Rclone sync - Important: Since this can cause data loss

Hi all, I'm testing "rclone sync" command to synchronize a local folder to a remote folder on OneDrive Cloud. The first time I've lauched sync I received some error like these (8500 files - 120 MB size):

2020/07/04 15:52:18 ERROR : : error reading source directory: directory not found
2020/07/04 15:52:18 ERROR : One drive root 'remote_folder': not deleting files as there were IO errors

The second time no error occurred so I've figured out that the sync happened correctly.

Reading the page about sync command on rclone site I've found this:

Important : Since this can cause data loss, test first with the --dry-run flag to see exactly what would be copied and deleted.

I would like to use the sync command inside a crontab so to get regular updates on the remote folder, I could not launch a --dry-run flag before this update. What does it mean "data loss" in these sentence? Could I loss data on the source folder? I only need a one way sync from a local folder and a remote folder to keep a fresh backup of my data.

Many thanks in advance for your replay.

hello and welcome to the forum,

you cannot lose data on the source, as rclone is one way sync, source to dest.
sync can and will delete files on the dest
you can prevent the deletions by using https://rclone.org/docs/#backup-dir-dir

to understand what is going on,
you should use a log file with debug output

Many thanks again for your clear answer.


That's almost spot on but be careful as there have been folks that have used the same source/dest so the files look the same and deleted their entire source so it can happen so dry-run first and be sure as deletes can be bad.

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