Monday, January 16, 2006 [Tweets] [Favorites]

Fixing rsync on Tiger

Mac OS X 10.4.4 recently shipped, and yet after four OS updates rsync is still broken. It frequently crashes when using the -E/--extended-attributes option, it doesn’t preserve the modification dates of files with resource forks, and it copies all the extended attributes even if they haven’t changed.

J.D. Bakker comes to the rescue with a patch that claims to fix the most severe problems. He’s written clear instructions for how to apply it, and it seems to work. At last, it looks like I’ll be able to keep my PowerBook synchronized.

Actually, the first few times I tried it, it didn’t work. I kept getting these errors:

rsync error: protocol incompatibility (code 2) at sender.c(59)
rsync: fstat failed: No such file or directory (2)

and on different files each time. Mac OS X Hints suggested disabling Spotlight, and that stopped the errors. I would have thought that Spotlight should be disabled on the target volume, since it was the one being modified, however I found that it was necessary to disable it on the source volume. Then it worked.

For this and other reasons, I seem destined to always have Spotlight turned off. Thus, I really appreciate it when developers don’t rely on Spotlight being available. It’s cool if you make your app’s data available to Spotlight, but I shouldn’t have to turn on Spotlight to search from within your app.

3 Comments

This is absolutely great news. I've been waiting for Apple to fix rsync since 10.4.1, but to no avail. Seems to have no particular priority for them, which is a shame.

I'd like to use rsync for backup purposes. But I'm still hesitant after this fix. After all, trust is important for any backup tool. When it comes to this patched-up version of rsync, I'm still not quite sure if I should trust it for backing up my valuable data.

On a completely unrelated note, have you tried the ".noindex" trick described on Mac OS X hints instead of disabling Spotlight altogether? (I've disabled it, so I couldn't care less, but still curious...). To be honest, this spotlight-related bug also doesn't increase my trust level in rsync :-(.

The .noindex trick doesn't seem very practical in my case.

After many hours and much fiddling trying to get backup happening. Rsync Lart 2.6.6 Darwinports version finally works for me on Tiger

http://rsync-lart.darwinports.com/

Well as good as it can....see Backup Bouncer for independent testing of capability:
http://www.n8gray.org/blog/2007/04/27/introducing-backup-bouncer/