Solved

Is it possible to save/restore HFS+ resource fork data from Linux?

Posted on 2008-10-01
8
893 Views
Last Modified: 2013-12-26
When I boot a Mac(running OSX) with a live linux CD, I can mount the HFS+ partition. If I tar a folder then untar it to a different location, when I reboot into OSX, the resource fork data is missing on the copy. How can I preserve it?
0
Comment
Question by:jasonzx
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
8 Comments
 
LVL 40

Expert Comment

by:Eoin OSullivan
ID: 22615622
Tar does not fully preserve OSX file attributes and has issues with long filenames  in addition to other issues ..
See this forum which explains
https://macosx.com/forums/unix-x11/19953-using-tar-backup-applications-2.html

OSX uses ditto which preserves everything

I think rsync latest version will also support resource forks
http://developer.apple.com/macosx/backuponmacosx.html
0
 
LVL 4

Expert Comment

by:Alex Curylo
ID: 22650944
You'll have to do a little research to figure out exactly whatever your "live linux CD" does to present HFS+ resource forks. If it is conventional, at the same place as the data fork of <filename>, you will see

<filename>/..namedfork/rsrc

If that's not it exactly, it'll probably be something similar.

When you create an archive of that under Linux and then unarchive it somewhere else, Linux will create exactly what's in that archive. But what's in the archive is not the same as the internal HFS+ representation. So when you reboot to OS X, you have the data fork in <filename> and you have the resource fork in the path above or some close equivalent, which is invisible in the Finder by default since it starts with a period, and is not an actual HFS+ fork so it's not recognized as belonging to <filename>.

As resource forks have been deprecated in OS X for several years now, the state of support for this is vanishingly likely to improve. I strongly recommend that you examine whatever the OS X task is you're trying to accomplish; there is almost certainly a more modern workflow you could be using that eliminates the use of files with resource forks.
0
 
LVL 4

Expert Comment

by:Alex Curylo
ID: 22650953
"vanishingly likely to improve"

I meant vanishingly UNlikely there, of course.
0
Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

 

Author Comment

by:jasonzx
ID: 22653911
The task I'm trying to accomplish is to mirror the data on one Mac running OSX to another Mac.
I've had limited success with a live Linux CD using piping the harddrive thru Tar and udp-sender. Some installed programs(Dreamweaver and Firefox specifically) show up as a folder called 'firefox.app'(instead of an application I can execute).
All the info I read seems to point to the fact that I'm not properly backing up and restoring the resource fork.
Supposedly there's a hfstar util that should do the trick but I've been unable to compile it under Linux(looks for header files I don't have and can't find)
0
 
LVL 4

Accepted Solution

by:
Alex Curylo earned 500 total points
ID: 22654090
"The task I'm trying to accomplish is to mirror the data on one Mac running OSX to another Mac."

By running Linux?? Yoiks. That's got epic fail written all over it :) If you want something lightweight, the Darwin source would be the place to start.

"Some installed programs(Dreamweaver and Firefox specifically) show up as a folder called 'firefox.app'(instead of an application I can execute)."

Actually, those *are* the applications you can execute. Whilst displayed as a single icon in the Finder without the ".app" extension, these folders -- the technical name is "bundles" -- have been the recommended way to create an OS X application since, well, as long as there has been an OS X. I'd be more surprised to find that you had any applications on the machine that were not .app folders, these days. And the main point of bundles was -- surprise! -- to eliminate a major use of resource forks.

"Supposedly there's a hfstar util that should do the trick but I've been unable to compile it under Linux(looks for header files I don't have and can't find)"

And I very sincerely doubt you will be able to in the Linux world. I'd look into using Darwin for whatever you're using Linux for, that's very likely your most promising way forward.

http://www.puredarwin.org/developers/hfsplus
0
 

Author Comment

by:jasonzx
ID: 22654830
I started this project under Linux because I was more familiar with it. Considered using Darwin a while back but couldn't find any information on building a live Darwin CD. Don't suppose you know of a good tutorial for that?
0
 
LVL 4

Expert Comment

by:Alex Curylo
ID: 22656177
Unfortunately, nothing all that close exists so far. There's a project working on it here.

http://www.puredarwin.org/

I imagine the people there would have some more knowledgeable perspectives for you on how to accomplish copying Mac volumes. I did some more googling around now that I'm kinda interested in the problem :) and I didn't see anything to change my impression that whilst you can read OS X volumes adequately using modern flavours of Linux, actually writing to them successfully is fraught with peril at the very very best.

However, if there is any solution to be found, it's almost certainly going to be with extracts from the Darwin source if not Darwin itself exactly, and the PureDarwin people would be the best on the planet to take that question up with, I imagine.
0
 

Author Closing Comment

by:jasonzx
ID: 31501991
Thanks Alex. You've been very helpful.
0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this article we discuss how to recover the missing Outlook 2011 for Mac data like Emails and Contacts manually.
In this post we will learn different types of Android Layout and some basics of an Android App.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question