rsync crashes as daemon?

Previous to 10.4, I've been using rsync from the University of Michigan to set up an rsync server (rsync --daemon) to synchronize our labs.

In 10.4, rsync seems to work fine on its own, except for the daemon portion. If I try to use:

sudo rsync --daemon

I return immediately to the command line and no rsync is running; the error log in /var/log/system.log contains:

Aug 12 14:52:00 shocked sudo: webmaster : TTY=ttyp1 ; PWD=/Users/webmaster ; USER=root ; COMMAND=/usr/bin/rsync --daemon
Aug 12 14:52:00 shocked crashdump[3305]: rsync crashed
Aug 12 14:52:00 shocked crashdump[3305]: crash report written to: /Library/Logs/CrashReporter/rsync.crash.log

The crash log contains (among other things):

Exception: EXC BADACCESS (0x0001)
Codes: KERN PROTECTIONFAILURE (0x0002) at 0x0000000c

Does anyone know how to get rsync daemon working on OS X Server? Has anyone successfully done this?

It'd be nice to use the built-in rsync; it appears to be better at HFS files than the UMich version. But without an rsync server, rsync requires the root password of the server to synchronize. We don't want that in our labs.

Jerry

Posted on Aug 12, 2005 4:01 PM

Reply
5 replies

Aug 15, 2005 8:24 PM in response to Jerold Stratton

The HFS support in the version of rsync that ships with OS X 10.4 is broken.

Read this article:
http://www.afp548.com/article.php?story=20050219192044818&query=rsync

And use this package installer of Rsync:
http://people.aiscomputers.com/~msolberg/sync.dmg

This installer doesn't affect Apples version of rsync in any way. It installs

a patched version of rsync to //usr/local/bin
example scripts to /Library/Scripts/Sync/

As far as restoring the rsync backup you put the AppleDouble files back together by using FixupResourceForks.

To fix up the resource forks on a folder and the contents use FixupResourceForks (I think you may need Dev. Tools installed to do this).

An example of how to restore the resource forks on the Users dir:

/System/Library/CoreServices/FixupResourceForks /Users/

You can read more about restoring the resource forks here:

http://xnews.soad.umich.edu/RsyncX_Forums/index.php?topic=33.0%3E

A really good way to see if resource forks are being restored correctly is to use xattr.

Read about xattr here: http://arstechnica.com/reviews/os/macosx-10.4.ars/7

Download from here (also linked to from the arstechnica article): http://dev.bignerdranch.com/public/bnr/xattr.dmg

Note that in the arstechnica article rsync with hfs works for them - I don't know why. It doesn't work for the guy that wrote xattr or myself using exactly the same commands.

If you have any questions post back here.

Aug 16, 2005 11:38 AM in response to Sam Watterson

Note that in the arstechnica article rsync with hfs works for them - I don't
know why. It doesn't work for the guy that wrote xattr or myself using exactly
the same commands.


Thanks for the info. As far as I can tell, it's working for me also. (rsync with hfs, that is, on 10.4.2.)

If I understand your post and the threads linked in it correctly, the modified rsync you link to cannot be used to restore a source folder, only to create a backup. If this is the case, I think I'm in the same boat as the person on the umich.edu thread who said "it makes rsync ineffective" for our purposes.

We're using rsync to easily synchronize lab computers, on a regular basis, with a source "image" on a server. The source image contains every single file, from / on down, that the lab computers need; the point is that only changed files get downloaded. If the files on the lab computers are changed (by FixupResourceForks) every time they are downloaded, they will always end up being downloaded.

As far as I can tell, the built-in rsync works for this purpose; but of course it needs to be root on both ends, which means that whoever is "cleaning" a lab computer needs to know the root password for the server. Starting rsync in daemon mode on the server removes this problem, but that's the point where I'm running into trouble. The built-in rsync for 10.4.2 crashes if started with --daemon.

Jerry

Sep 9, 2005 11:17 PM in response to Sam Watterson

Does anyone have any idea where I can get information on whether this problem was actually resolved via the 10.4.2 update?

I'm thinking about starting to use rsync to back up my laptop when I'm on the road to my server at home, but I don't want to set myself up for failure if "rsync -E" (I believe that's the flag used to enable HFS resource fork support) is broken.

Anyone know where I can find this out?

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

rsync crashes as daemon?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.