Making today worse so tomorrow seems better.
Restore Finder magic to a sparsebundle directory
This is a quick fix to restore t
he special behavior of a .sparsebundle directory in Finder.
While experimenting with TimeMachine’s unsupported network backup capabilities I rsync’d my host_blah.sparsebundle from one drive to another (without using -E, more on that later). The result was that my .sparsebundle now appeared in the Finder just as a normal folder, instead of with a disk image icon. This also meant that I couldn’t open the image in DiskUtility any more.
The fix is to use SetFile to restore the “Bundle” attribute.
$ /Developer/Tools/SetFile -a B host_blah.sparsebundle
The first time I mounted it afterwards I had to wait for fsck_hfs to complete, since the “com.apple.diskimages.fsck” attribute had been cleared, but otherwise it’s back to it’s old self.
I also learned that in order to avoid this (and many other much nastier problems) you should use the -E flag for rsync under Mac OS. This correctly copies over the resource forks, extended attributes and meta-data also.
(This item is probably old-hat to many Mac users, since Bundles have been in the Finder since OS 9. But it took me a couple of days of searching and experimentation, so I figure it could use some better visibility.)
- About
- Technology, programming, the interwebs and other topics by members of the slackworks community.
- Contributors
- All Posts
-
- Aug 05 2009 Using New Relic add_method_tracer with Class methods
- Jun 30 2009 Estimating Key Collisions (Birthday Problem)
- Jun 29 2009 The Blarg is Back!
- Jul 23 2008 JNDI with Rails
- Jul 06 2008 JRuby Service in Rails
- May 16 2008 Wildcard DNS and Rails
- Jan 30 2008 Sprint Error "911" and the "Download Domain"
- Jan 16 2008 Getting a Good View of Your Couch
- Jan 12 2008 Bring Selenium to the integration party
- Jan 12 2008 Bj Makes Attachment_fu Happy
- Jan 03 2008 Restore Finder magic to a sparsebundle directory
- Dec 18 2007 First Post
0 comments