Skip to content

Instantly share code, notes, and snippets.

@emory
Created July 4, 2014 16:29
Show Gist options
  • Select an option

  • Save emory/c41f8a5b7bf182c7aa3f to your computer and use it in GitHub Desktop.

Select an option

Save emory/c41f8a5b7bf182c7aa3f to your computer and use it in GitHub Desktop.
Two of two
----- Original message -----
From: "Emory L." <emory@kvet.ch>
To: Mac OS X enterprise deployment project <macenterprise@lists.psu.edu>
Subject: RE: Osx 10.9 tags
Date: Tue, 18 Mar 2014 10:23:43 -0500
adambarnett52@GMAIL.COM writes:
> No joy with using -E
>
> :(
Correct. From the Apple-supplied rsync man page:
   ‐E, ‐‐extended‐attributes
              Apple specific option  to  copy  extended  attributes,  resource
              forks,  and  ACLs.   Requires at least Mac OS X 10.4 or suitably
              patched rsync.
It does this by way of a simple hack:
"Since OS X 10.4 (aka Tiger) the MacOS ships with a modified version of rsync.
 An added option, -E,
enables the transfer of extended attributes. This is done by
 encapsulating the resource fork, Finder data et al in a synthetic file
which is added
 to the rsync transfer list. The name of this file is
formed by prepending ._ to the
 name of the original file, a
technique which is also used when copying data from
 HFS+ partitions to
non-Apple file systems such as NFS mounts. It may not be
 pretty or
foolproof (what happens when both foo and ._foo exist?), but at least
it's
 documented by Apple and not likely to change in the very near
future. This rsync
 derivative is based on rsync-2.6.3."
  -- jdb @ http://lartmaker.nl/rsync/
And in later versions of rsync, the ChangeLog indicates enhancements:
    - Added the --acls (-A) option to preserve Access Control Lists.  This is
      an improved version of the prior patch that was available, and it even
      supports OS X ACLs.  If you need to have backward compatibility with old,
      ACL-patched versions of rsync, apply the acls.diff file from the patches
      dir.
    - Added the --xattrs (-X) option to preserve extended attributes.  This is
      an improved version of the prior patch that was available, and it even
      supports OS X xattrs (which includes their resource fork data).  If you
      need to have backward compatibility with old, xattr-patched versions of
      rsync, apply the xattrs.diff file from the patches dir.
My take is that using Apple's rsync binary will result in some extended attributes making it over fine, certainly Resource Forks, and probably some ACLs. But the aforementioned synthetic file created in the older rsync doesn't contain the newer information or all the information or uses a deprecated method perhaps?
    % /usr/bin/rsync --version                                               
    rsync  version 2.6.9  protocol version 29
    Copyright (C) 1996-2006 by Andrew Tridgell, Wayne Davison, and others.
Seven years is a long time.
//emory
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment