David Feldman
2008-Jun-20 03:01 UTC
supporting HFS+ attributes and forks on a Linux rsync server?
I'm trying to use rsync to back up a Mac OS X machine to a Linux server. I've used the instructions at http://www.bombich.com/mactips/rsync.html to patch and install rsync 3.0.2 to support HFS+ attributes and forks on the client. I was assuming the Linux box needed the same version, and so tried compiling the patched rsync but got the following: syscall.c: In function `get_create_time': syscall.c:406: storage size of `attrList' isn't known syscall.c:409: `ATTR_BIT_MAP_COUNT' undeclared (first use in this function) syscall.c:409: (Each undeclared identifier is reported only once syscall.c:409: for each function it appears in.) syscall.c:410: `ATTR_CMN_CRTIME' undeclared (first use in this function) syscall.c:411: warning: implicit declaration of function `getattrlist' syscall.c:411: `FSOPT_NOFOLLOW' undeclared (first use in this function) syscall.c:406: warning: unused variable `attrList' syscall.c: In function `set_create_time': syscall.c:418: storage size of `attrList' isn't known syscall.c:428: `ATTR_BIT_MAP_COUNT' undeclared (first use in this function) syscall.c:429: `ATTR_CMN_CRTIME' undeclared (first use in this function) syscall.c:430: warning: implicit declaration of function `setattrlist' syscall.c:430: `FSOPT_NOFOLLOW' undeclared (first use in this function) syscall.c:418: warning: unused variable `attrList' ...which, I suppose, makes sense since Linux doesn't use HFS+. This Linux box already has an rsync that supports extended atttibutes. From its version string, I'm guessing it's similar to the default OS X one (an Apple-patch 2.6.3 that's apparently got some issues). I'm also presuming the versions on client and server have to match, at least roughly? So, for instance, if the server-side one that's already there uses -E for extended attributes and 3.0.2 uses -X, they probably won't cooperate? (They don't seem to be in my initial tests). Any suggestions? Is there a way to compile rsync for Linux that will preserve the extended attributes, resource forks, etc? Or if not, what should I be doing? Thanks! Dave Feldman
Matt McCutchen
2008-Jun-20 15:33 UTC
supporting HFS+ attributes and forks on a Linux rsync server?
On Thu, 2008-06-19 at 17:48 -0700, David Feldman wrote:> I'm trying to use rsync to back up a Mac OS X machine to a Linux server. > I've used the instructions at http://www.bombich.com/mactips/rsync.html > to patch and install rsync 3.0.2 to support HFS+ attributes and forks on > the client. I was assuming the Linux box needed the same version, and so > tried compiling the patched rsync but got the following: > > syscall.c: In function `get_create_time': > syscall.c:406: storage size of `attrList' isn't known > syscall.c:409: `ATTR_BIT_MAP_COUNT' undeclared (first use in this function) > syscall.c:409: (Each undeclared identifier is reported only once > syscall.c:409: for each function it appears in.) > syscall.c:410: `ATTR_CMN_CRTIME' undeclared (first use in this function) > syscall.c:411: warning: implicit declaration of function `getattrlist' > syscall.c:411: `FSOPT_NOFOLLOW' undeclared (first use in this function) > syscall.c:406: warning: unused variable `attrList' > syscall.c: In function `set_create_time': > syscall.c:418: storage size of `attrList' isn't known > syscall.c:428: `ATTR_BIT_MAP_COUNT' undeclared (first use in this function) > syscall.c:429: `ATTR_CMN_CRTIME' undeclared (first use in this function) > syscall.c:430: warning: implicit declaration of function `setattrlist' > syscall.c:430: `FSOPT_NOFOLLOW' undeclared (first use in this function) > syscall.c:418: warning: unused variable `attrList' > > ...which, I suppose, makes sense since Linux doesn't use HFS+. This > Linux box already has an rsync that supports extended atttibutes. From > its version string, I'm guessing it's similar to the default OS X one > (an Apple-patch 2.6.3 that's apparently got some issues). I'm also > presuming the versions on client and server have to match, at least > roughly? So, for instance, if the server-side one that's already there > uses -E for extended attributes and 3.0.2 uses -X, they probably won't > cooperate? (They don't seem to be in my initial tests).Different versions of rsync generally enjoy wide compatibility for features they handle in the same way, but the Apple -E implementation won't be able to exchange extended attributes with the rsync 3.* -X implementation.> Is there a way to compile rsync for Linux that will > preserve the extended attributes, resource forks, etc? Or if not, what > should I be doing?You won't be able to preserve file flags and creation times since Linux doesn't have them. On the other hand, rsync 3.0.2 with -X will preserve getxattr-style extended attributes (including resource forks, which Mac OS 10.4+ exposes as extended attributes); no patches are needed. 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/20080620/f97116be/attachment.bin
Reasonably Related Threads
- lchmod for osx (was: Symlinks in OS X (10.4.1))
- DO NOT REPLY [Bug 7685] New: rsync should not set the creation data on the root folder of an HFS+ volume
- Using pre2 for backing up a mac
- some clarity Re: HFS+ resource forks: WIP patch included
- HFS+ resource forks: WIP patch included