Komáromi Tamás
2008-Aug-19 22:33 UTC
rsync --delete problem with accent characters on Mac OS X HFS
Hello, I would like to sync my Linux firewall to my Mac OS X. The Linux is a Debian 4.0 with ext3 filesystem (UTF-8) $ rsync --version rsync version 3.0.2 protocol version 30 The Mac OS X is a 10.5 Leopard with HFS+ (UTF-8) $ /sw/bin/rsync --version rsync version 3.0.3 protocol version 30 (fink version) I have many accents in my filenames: $ ls -l | tee filelist total 12 -rw-r----- 1 tamas users 3 2008-08-19 14:19 ?rv?zt?r? t?k?rf?r?g?p.rtf -rw-r----- 1 tamas users 4 2008-08-19 14:19 ?let.txt -rw-r----- 1 tamas users 0 2008-08-20 00:00 filelist -rw-r----- 1 tamas users 5 2008-08-19 14:19 k?rte.rtf $ file filelist filelist: UTF-8 Unicode text The first sync: $ /sw/bin/rsync --archive --update --verbose --delete firewall:teszt . receiving incremental file list teszt/ teszt/filelist teszt/k?rte.rtf teszt/?rv?zt?r? t?k?rf?r?g?p.rtf teszt/?let.txt sent 91 bytes received 601 bytes 461.33 bytes/sec total size is 263 speedup is 0.38 $ ls -l teszt/ | tee filelist-on-macosx total 32 -rw-r----- 1 tamas staff 3 Aug 19 14:19 ?rv?zt?r? t?k?rf?r?g?p.rtf -rw-r----- 1 tamas staff 4 Aug 19 14:19 ?let.txt -rw-r----- 1 tamas staff 251 Aug 20 00:00 filelist -rw-r----- 1 tamas staff 5 Aug 19 14:19 k?rte.rtf urbanit-wlan:~/temp$ file filelist-on-macosx filelist-on-macosx: UTF-8 Unicode text The second sync: $ /sw/bin/rsync --archive --update --verbose --delete firewall:teszt . receiving incremental file list deleting teszt/k?rte.rtf deleting teszt/?let.txt deleting teszt/?rv?zt?r? t?k?rf?r?g?p.rtf teszt/k?rte.rtf teszt/?rv?zt?r? t?k?rf?r?g?p.rtf teszt/?let.txt sent 69 bytes received 304 bytes 248.67 bytes/sec total size is 263 speedup is 0.71 The rsync deletes my files with accents and download it again. (it doesn't delete the 'filelist' file) It's really annoying if you have many big files with accents. I try the same config with Mac OS X Tiger and Leopard with UFS (Unix Filesystem) and it works correctly. The main problem with the UFS is the 4 GB maximum file size limit, so I can't use UFS fs on my backup partition. It works over SMBFS protocol (aka local file sync) but Samba destroys my softlinks. I tried with ZFS (as a local fs) and it shows the same problem. I tried it over NFS and the problem remain. Please help me to solve this problem! Best regards, Tamas Komaromi from Hungary
Matt McCutchen
2008-Aug-19 23:52 UTC
rsync --delete problem with accent characters on Mac OS X HFS
On Wed, 2008-08-20 at 00:20 +0200, Kom?romi Tam?s wrote:> I would like to sync my Linux firewall to my Mac OS X.> The rsync deletes my files with accents and download it again.> $ /sw/bin/rsync --archive --update --verbose --delete firewall:teszt . > receiving incremental file list > deleting teszt/k?rte.rtf > deleting teszt/?let.txt > deleting teszt/?rv?zt?r? t?k?rf?r?g?p.rtf > teszt/k?rte.rtf > teszt/?rv?zt?r? t?k?rf?r?g?p.rtf > teszt/?let.txtThis is probably a result of the Mac filesystem's infamous behavior of automatically decomposing UTF-8 characters in filenames, which is mentioned in the rsync FAQ: http://rsync.samba.org/FAQ.html#2 To fix it on a pull, pass --iconv=UTF8-MAC,UTF-8 . Matt -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part Url : http://lists.samba.org/archive/rsync/attachments/20080819/5b61af7b/attachment.bin