supporting HFS+ attributes and forks on a Linux rsync server?

View: New views
7 Messages — Rating Filter:   Alert me  

supporting HFS+ attributes and forks on a Linux rsync server?

by David Feldman :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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

--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Re: supporting HFS+ attributes and forks on a Linux rsync server?

by Matt McCutchen-7 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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


--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

signature.asc (204 bytes) Download Attachment

Re: supporting HFS+ attributes and forks on a Linux rsync server?

by David Feldman :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> 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.

Thanks. Just to make sure I understand: I can compile a stock rsync
3.0.2 on the Linux box - no patches at all - and it will preserve all
the Mac-specific data with -X, except for file flags and creation times?
Is that correct?

Also: what are file flags? Stuff like access control and locked?
Anything else?

Thanks again,
--Dave

--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Re: supporting HFS+ attributes and forks on a Linux rsync server?

by Matt McCutchen-7 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Fri, 2008-06-20 at 10:32 -0700, David Feldman wrote:
> > 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.
>
> Thanks. Just to make sure I understand: I can compile a stock rsync
> 3.0.2 on the Linux box - no patches at all - and it will preserve all
> the Mac-specific data with -X, except for file flags and creation times?
> Is that correct?

Not really.  -X preserves extended attributes via the getxattr/setxattr
interface and does not cater specifically to the Mac.  However, the Mac
filesystem exposes some kinds of Mac metadata as extended attributes, so
-X will preserve these.  I know that resource forks are preserved this
way, but more esoteric pieces of Mac metadata might not be.  Your best
bet is to do a test and see if the metadata you need is preserved.

> Also: what are file flags? Stuff like access control and locked?
> Anything else?

I know they include the Finder "Locked" flag.  They may include other
things, but I'm pretty sure they don't include Mac ACLs.

You may be able to get better information from a Mac person.  (I don't
have a Mac.)

Matt


--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

signature.asc (204 bytes) Download Attachment

Re: supporting HFS+ attributes and forks on a Linux rsync server?

by David Feldman :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Any Mac folks out there able to comment? When I back up from a Mac to a
Linux machine with the -X flag, what Mac-specific file info is retained
or lost? Also, will I fare better using 2.6.3 and the -E flag or 3.0.2
and the -X flag in that scenario?

Thanks again,
--Dave

Matt McCutchen wrote:

> On Fri, 2008-06-20 at 10:32 -0700, David Feldman wrote:
>>> 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.
>> Thanks. Just to make sure I understand: I can compile a stock rsync
>> 3.0.2 on the Linux box - no patches at all - and it will preserve all
>> the Mac-specific data with -X, except for file flags and creation times?
>> Is that correct?
>
> Not really.  -X preserves extended attributes via the getxattr/setxattr
> interface and does not cater specifically to the Mac.  However, the Mac
> filesystem exposes some kinds of Mac metadata as extended attributes, so
> -X will preserve these.  I know that resource forks are preserved this
> way, but more esoteric pieces of Mac metadata might not be.  Your best
> bet is to do a test and see if the metadata you need is preserved.
>
>> Also: what are file flags? Stuff like access control and locked?
>> Anything else?
>
> I know they include the Finder "Locked" flag.  They may include other
> things, but I'm pretty sure they don't include Mac ACLs.
>
> You may be able to get better information from a Mac person.  (I don't
> have a Mac.)
>
> Matt
--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Re: supporting HFS+ attributes and forks on a Linux rsync server?

by Mike Bombich :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Will --fake-super handle this?

       --fake-super
              When  this  option is enabled, rsync simulates super-user activities by saving/restoring the privileged attributes via spe-
              cial extended attributes that are attached to each file (as needed).  This includes the file's owner and group  (if  it  is
              not  the default), the file's device info (device & special files are created as empty text files), and any permission bits
              that we won't allow to be set on the real file (e.g.  the real file gets u-s,g-s,o-t for safety) or that  would  limit  the
              owner's  access  (since  the  real  super-user  can  always  access/change  a  file,  the  files  we  create  can always be
              accessed/changed by the creating user).  This option also handles ACLs (if --acls  was  specified)  and  non-user  extended
              attributes (if --xattrs was specified).

              This is a good way to backup data without using a super-user, and to store ACLs from incompatible systems.


Mike

On Jun 22, 2008, at 8:15 PM, David Feldman wrote:

Any Mac folks out there able to comment? When I back up from a Mac to a Linux machine with the -X flag, what Mac-specific file info is retained or lost? Also, will I fare better using 2.6.3 and the -E flag or 3.0.2 and the -X flag in that scenario?

Thanks again,
--Dave

Matt McCutchen wrote:
On Fri, 2008-06-20 at 10:32 -0700, David Feldman wrote:
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.
Thanks. Just to make sure I understand: I can compile a stock rsync 3.0.2 on the Linux box - no patches at all - and it will preserve all the Mac-specific data with -X, except for file flags and creation times? Is that correct?
Not really.  -X preserves extended attributes via the getxattr/setxattr
interface and does not cater specifically to the Mac.  However, the Mac
filesystem exposes some kinds of Mac metadata as extended attributes, so
-X will preserve these.  I know that resource forks are preserved this
way, but more esoteric pieces of Mac metadata might not be.  Your best
bet is to do a test and see if the metadata you need is preserved.
Also: what are file flags? Stuff like access control and locked? Anything else?
I know they include the Finder "Locked" flag.  They may include other
things, but I'm pretty sure they don't include Mac ACLs.
You may be able to get better information from a Mac person.  (I don't
have a Mac.)
Matt
--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html



--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Re: supporting HFS+ attributes and forks on a Linux rsync server?

by Matt McCutchen-7 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, 2008-06-23 at 11:49 -0500, Mike Bombich wrote:
> Will --fake-super handle [Mac-specific metadata]?

The only thing it might handle is a Mac ACL that can't be set on Linux.
--fake-super doesn't have special handling for creation times or file
flags (in the respective patches) or any other Mac-specific metadata.

Matt

On Jun 22, 2008, at 8:15 PM, David Feldman wrote:
> Any Mac folks out there able to comment? When I back up from a Mac to
> a Linux machine with the -X flag, what Mac-specific file info is
> retained or lost? Also, will I fare better using 2.6.3 and the -E flag
> or 3.0.2 and the -X flag in that scenario?



--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

signature.asc (204 bytes) Download Attachment
LightInTheBox - Buy quality products at wholesale price