"sync" deletes files on target even with --delete-excluded

Do I misunderstand the meaning of the --delete-excluded flag? I’m trying to sync missing files and directories to my target using “sync” but I don’t want to delete any files I don’t have locally. This is the command I used:

rclone --delete-excluded -v sync . encrypted:/pictures

Because it was a lot of data, I didn’t monitor it the entire time. When I looked, all of the local files which hadn’t been on the target previously were deleted, e.g.

2017/08/19 03:55:20 INFO  : 2013_06_28/IMG_6540.jpg: Deleted

What am I doing wrong here?


Version is 1.37
macOS Sierra 10.12.6
Target is via SFTP

–delete-excluded Delete files on dest excluded from sync

So it will actually delete MORE files in principle. It will make no difference in your case (because you don’t have any excluded files):

–exclude stringArray Exclude files matching pattern

You just want to do copy, not sync.