Cartoon drawing of a man with a grey beard and glasses.

Martin Kenny's blog

A fix for cwRsync ignoring --delete

I was just helping Michael set up a Windows rsync-based solution to sync/backup his symbolic-linked game saves to a central folder (for subsequent syncing with BitTorrent Sync). We installed cwRsync, then used a command-line like this:

rsync -aL /cygdrive/C/Users/michael/GameSaves/ /cygdrive/C/Users/michael/Backups/

Copying worked without a hitch, but then we added --delete to the command-line. This should delete any files from the Backups folder that have been deleted from the GameSaves folder since the last sync:

rsync -aL --delete /cygdrive/C/Users/michael/GameSaves/ /cygdrive/C/Users/michael/Backups/

Unlike the copying, this proved difficult to get working. After longer than I care to admit, I listened to my Spidey-sense, and switched the upper-case drive letters to lower-case. Suddenly the deletes started working! The final command-line looked like this:

rsync -aL --delete /cygdrive/c/Users/michael/GameSaves/ /cygdrive/c/Users/michael/Backups/

So, it seems that cwRsync (and possibly a full Cygwin rsync installation) doesn’t like upper-cased drive letters in its paths.