Deutsch

View FAQ entry #26

Back

Rsync under Windows syncing to Synology NAS - Problems with filenames containing german umlauts
Written on by - 25510 views so far.

When trying to sync Windows directories containing german umlauts to my Synology NAS I've encountered destroyed filenames on the NAS device, the files where copied but the filenames with german umlauts are wrong and also not accessable under Windows :(

Also rsync removed all "@eaDir" directories on the NAS device which are created by the Media Index tool (they contain thumbnails for pictures), this is of course not desired.

 

After googling and consulting the rsync man page I've finally found a solution for these problems (must be all on one line):

 

rsync.exe -arz --iconv=WINDOWS-1252,utf-8 --exclude=@eaDir --compress --progress --stats --delete 
-e "C:\CWRSYNC\BIN\ssh.exe" /cygdrive/d/synctest/ nas4tb:/volume1/Storage/synctest/

The magic comes from the parameter --iconv=WINDOWS-1252,utf-8 which translates the filenames from Windows charset using codepage 1252 to the NAS charset UTF-8 thus preserving all umlauts and other special characters on the NAS device!

The parameter --exclude=@eaDir excludes the @eaDir directories on the NAS device, so that rsync won't remove them.

 

I'm using the cwRsync package for Windows, which can be found under the following link:

 

https://www.itefix.no/i2/content/cwrsync-free-edition

 

I've changed the supplied DOS batch script "cwrsync.cmd" and added the command

 

chcp 1252 

before adding the rsync line as printed above. This will change the codepage of the DOS script to 1252, which is the codepage Windows is using. However, that good old DOS window won't print the german umlauts when rsync prints it's progress. But that is only a cosmetical issue, the filenames are correctly stored on the NAS device.

 

Thanks to that solution I can now successfully rsync my Windows files to my NAS device :)

 



Back | Top