Restore sparsebundle extended attributes after rsync

If you rsync a sparse bundle to another Mac without the -E flag (or if you copy it to a non Mac system), you will loose the ability to double click on it in the Finder to mount it. This is because the extended attributes telling the Finder the folder is actually a bundle are lost in the transfer.

The following piece of code I found here fixed the problem for me. Simply compile and run the code giving the path to the bundle in parameter and it will restore the attributes.

One thought on “Restore sparsebundle extended attributes after rsync”

  1. Josh Enders

    rsync -E is executability:

    $ rsync –help | grep — -E
    -E, –executability preserve the file’s executability

    I think you mean -X:

    $ rsync –help | grep — extended
    -X, –xattrs preserve extended attributes

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">

Comment moderation is enabled. Your comment may take some time to appear.