Handle resource forks correctly with newer rsync

Oct 15, '09 07:30:01AM

Contributed by: tedw

For rsync users, the newest version of rsync (3.0.6 as of this moment) seems to be able to handle Mac extended attributes and resource forks correctly. Unfortunately, it doesn't seem to ship with Snow Leopard, but it can be downloaded and installed fairly easily. After downloading from the above-linked site, just follow the instructions in the INSTALL text file, and remember that the make install command needs to be run with administrator privileges (sudo). Further, you may need to adjust your PATH and MANPATH settings, so that /usr/local/bin and /usr/local/share/man (the default install locations) appear earlier in the list than do /usr/bin, the home of the stock rsync.

Your current rsync scripts may need some tweaking, too. For example, the -E flag no longer refers to extended attributes (it now tells rsync to preserve executability); -X is used for extended attributes. Also, -X is not included in the standard -a (archive) flag, and should be added explicitly.

[robg adds: The version of rsync in both Leopard and Snow Leopard is quite old -- 2.6.9, which shipped in November of 2006. You can also install the newest rsync via either MacPorts or Fink.]

Comments (8)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20090926210822409