Transfer resource forks (-X -E) but not data?

Matt McCutchen matt at mattmccutchen.net
Sat Aug 9 18:49:06 GMT 2008


On Sat, 2008-08-09 at 12:58 -0400, Gian Spicuzza wrote:
> Our hard drive crashed and we restored a backup under Mac 10.3.9. 
> Unfortunately we lost the executability of the files.  The icons do not 
> show up and we have to manually click "Open With" and choose Word/Excel/etc.
> 
> I have an old backup that has old data, but all of the executibility, 
> permissions, and resource forks are still preserved.  Is there anyway to 
> transfer the executibility and extended attributed (-XE) but not the old 
> data?

Note first that the standard rsync's -X works only on Mac OS 10.4 and
newer.  If you need to copy resource forks on 10.3.9, you'll need an
rsync containing Vitorio Machado's patch from:

http://lists.samba.org/archive/rsync/2008-February/020093.html

One rather silly way to copy extended attributes but not data is to use
the options --date-only --modify-window=1000000000 to make the "quick
check" always pass (so that data of existing destination files is not
modified) and --ignore-non-existing to avoid creating new files on the
destination.  The --date-only option requires a copy of rsync with this
patch:

http://rsync.samba.org/ftp/rsync/patches/date-only.diff

Another approach would be to restore the old backup to another
filesystem using -XE and then restore the newer data (without -XE) on
top of that.

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/20080809/40d93497/attachment.bin


More information about the rsync mailing list