Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 908
  • Last Modified:

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

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
jasonzx
Asked:
jasonzx
  • 4
  • 3
1 Solution
 
Eoin OSullivanConsultantCommented:
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
 
Alex CuryloCommented:
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
 
Alex CuryloCommented:
"vanishingly likely to improve"

I meant vanishingly UNlikely there, of course.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
jasonzxAuthor Commented:
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
 
Alex CuryloCommented:
"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
 
jasonzxAuthor Commented:
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
 
Alex CuryloCommented:
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
 
jasonzxAuthor Commented:
Thanks Alex. You've been very helpful.
0

Featured Post

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now