I run rsync via a crontab every night to make an offsite backup of a directory's state, fairly trivial stuff really. While going through the logs, I noticed that in particular there were a set of files that were always deleted from the destination and recopied every time the rsync command ran. Further investigation shows the file names all had Unicode in them.

Looking at just one of the files, they're all variations, here's the filename. Note the accented character: Classics. . . Lè Tour Guide Training Guide.pdf

This appears as this sequence in the logs (a deletion and the new copy):

deleting ./Classics. . .Le\#314\#200 Tour Guide.ppt

./Classics. . . L\#303\#250 Tour Guide Training Guide.pdf

I'm pretty sure I know what's going on. The first one is taking the letter e and adding an accent over it. The second one is using a glyph itself that has the accent è. Visually, they're the same.

What I don't understand is why rsync doesn't just preserve whatever the file name actually is.

I'm using rsync v2.6.9 protocol version 29 on OS X Yosemite v10.10.5 to talk with rsync v3.1.0 protocol versions 31 on Ubuntu 14.04.4 LTS.

The OS X command line is:

/usr/bin/rsync -zaHv --progress --delete [email protected]:/src /Volumes/DstDrive/dst'

Is there a way I can get rsync to preserve the file names as-is?
Is this a bug in rsync?

  • 1
    Is the destination file system Mac OS Extended or FAT? Apr 13, 2016 at 17:38
  • Great question @Richard, the destination is OS X Extended (journaled, case-insensitive, but preserving). Apr 14, 2016 at 20:35


Browse other questions tagged .