Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > What OS X stuff still uses resource forks?

What OS X stuff still uses resource forks?
Thread Tools
besson3c
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Jan 29, 2004, 07:37 PM
 
Hello,

I'm exploring a network backup solution to backup my Powerbook to my FreeBSD server.

Because I own a Powerbook, I'm not going to swap the hard drive, or do anything else which would present the need to be able to boot OS X from my backup volume. Therefore, the important content on my drive is /Applications, and /Users.

I say "backup" only because it sounds kind of funny to say "sync my Powerbook to my FreeBSD server", but what I'm actually planning on doing is just keeping the data in sync via rsync, rather than dumping the entire contents of my hard drive to my backup volume every night.

I've been looking at rsync_hfs (macosxlabs.org), but unfortunately this doesn't compile on FreeBSD. I haven't found another product that will fill my need - the important "gotcha" being whether it will compile on FreeBSD.

The bottom line is that I'm considering bailing on taking the effort to make sure that the resource forks are properly managed during this backup, and using an unmodified rsync.

My question: am I going to create headaches? Since I'm using OS X full-time, everything is going to have a file extension, right? Is there anything left that doesn't have an extension, or otherwise relies on resource forks/type and creator codes? Will I be cool with omitting the resource forks, given my needs?

Thanks, as always, for your feedback!
     
RayX
Dedicated MacNNer
Join Date: Aug 2003
Status: Offline
Reply With Quote
Jan 29, 2004, 08:22 PM
 
You could create a Disk Image, copy it to the FreeBSD server, then have OS X backup to that image. That way you will preserve everything. For extra security, the Disk Image can also be encrypted.
     
besson3c  (op)
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Jan 29, 2004, 08:29 PM
 
Originally posted by RayX:
You could create a Disk Image, copy it to the FreeBSD server, then have OS X backup to that image. That way you will preserve everything. For extra security, the Disk Image can also be encrypted.
How would that work? Wouldn't the image need to be created and written to on the Mac? If so, that would require more disk space than I have.

If not, how would this be done within FreeBSD?

The only other problem with this is that it doesn't sync contents, it just mirrors them. I could do the same thing with ditto, or tar for that matter.
     
Agent69
Mac Elite
Join Date: Jun 2000
Status: Offline
Reply With Quote
Jan 29, 2004, 09:44 PM
 
I would recommend doing a backup to a disk image first (as a precaution) and then give plain rsync a try.

Besson3c, are you the only user on your computer? I am only person who uses my Mac and I only back up files, along with the Address Book and Safari bookmark files. (I use IMAP, so I don't have to worry about backing up my e-mail.) I use Unix commands to do the copying, so I never preserve resource forks.
Agent69
     
besson3c  (op)
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Jan 29, 2004, 11:50 PM
 
Originally posted by Agent69:
I would recommend doing a backup to a disk image first (as a precaution) and then give plain rsync a try.

Besson3c, are you the only user on your computer? I am only person who uses my Mac and I only back up files, along with the Address Book and Safari bookmark files. (I use IMAP, so I don't have to worry about backing up my e-mail.) I use Unix commands to do the copying, so I never preserve resource forks.
I'm the only user on my Powerbook, but I will be backing up other OS X users.

Is there anything in /Applications or in a home directory which requires a resource fork, that you know of?
     
RayX
Dedicated MacNNer
Join Date: Aug 2003
Status: Offline
Reply With Quote
Jan 30, 2004, 01:36 AM
 
Originally posted by besson3c:
How would that work? Wouldn't the image need to be created and written to on the Mac? If so, that would require more disk space than I have.

If not, how would this be done within FreeBSD?

The only other problem with this is that it doesn't sync contents, it just mirrors them. I could do the same thing with ditto, or tar for that matter.
The image needs to be created on the Mac (one time only), but then you can copy the image (just a file) to any other location and mount it over the network, so in your backup script you just need to mount and unmount the image on the FreeBSD server.

The disk image can be created at a set size or a sparse image that grows/shrinks as the content changes.

Should still be able to sync, as it's just like another drive to the system.

Check out command line tool hdiutil for creating disk images (more control than Disk Utility provides).
( Last edited by RayX; Jan 30, 2004 at 01:52 AM. )
     
besson3c  (op)
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Jan 30, 2004, 01:44 AM
 
Originally posted by RayX:
The image needs to be created on the Mac (one time only), but then you can copy the image (just a file) to any other location and mount it over the network, so in your backup script you just need to mount and unmount the image on the FreeBSD server.

The disk image can be created at a set size or a sparse image that grows/shrinks as the content changes.

Should still be able to sync as normal, as it's just like another drive to the system.
Hmmm... I tried something similar to this. I tried having an AFP volume automatically mounted and rsyncing from the source directory to /Volumes/myafpvolume. Unfortunately, this didn't seem to work effectively and generated errors about not being able to chown the file. Since this would become a local volume mounted within /Volumes however, I wouldn't necessarily have to use rsync.

This is definitely a solid idea worth looking into. Thanks!

Any others?
     
crayz
Dedicated MacNNer
Join Date: Jan 2001
Status: Offline
Reply With Quote
Jan 30, 2004, 02:41 AM
 
I don't have an idea, I just wanted to say that I imagine some application's files(specifically databases, like maybe Entourage) may still use the resource fork to store info. I'd be careful.
"You have violated the spelling of the DMCA and will be jailed with the Village People."
     
nerd
Senior User
Join Date: Jun 2002
Location: Albuquerque, NM
Status: Offline
Reply With Quote
Jan 30, 2004, 11:30 AM
 
I tried doing some of this about a year ago on a Linux box. I was doing it because I had 7 36gb drives that I wanted to make a RAID 5 out of. RaidTools in Linux worked great for it.

The problem was when it came to resource forks. AFP works but under Linux Netatalk doesn't support AFP 3.0 so you don't have long file names. The biggest problem this presented for me was on MP3s.

SMB supports the long file names but every time I unmounted a drive I seemed to loose my resource forks for random files.

SMB was unpredictable for me and I'll admit I'm not an expert so I might have had something set wrong on the Linux box. I also needed long file names so AFP wasn't the way to go. I ended up buying a couple 80gb drives and mirroring them in a RAID. Those drives get an automatic backup of the important folders every night.

Brad
     
hotani
Senior User
Join Date: Sep 2000
Location: Denver, CO, USA
Status: Offline
Reply With Quote
Jan 30, 2004, 11:45 AM
 
have you looked at Deja Vu?

I tried backing stuff up with cron jobs and copying via CLI, but it would trash a lot of files... screwing up or completely destroying their resource forks (I guess that was the problem).

Deja Vu uses 'psync' which will keep these intact, as well as let you do mirroring and remote backups (like you and your BSD machine).

Currently I have it set up to mirror my /Users and a couple other directories once a day to a secondary hard drive.
// hōtani
MDD G4 dual 867
     
SMacTech
Mac Elite
Join Date: Nov 2001
Location: Trafalmadore
Status: Offline
Reply With Quote
Jan 30, 2004, 02:47 PM
 
I used to use rsync to create my backups of what I thought were resource free files. However, all of my iMovie projects no longer worked. Fortunately, I also copied them to external hard drive.
     
Simon
Posting Junkie
Join Date: Nov 2000
Location: in front of my Mac
Status: Offline
Reply With Quote
Jan 30, 2004, 04:15 PM
 
Originally posted by hotani:
I tried backing stuff up with cron jobs and copying via CLI, but it would trash a lot of files... screwing up or completely destroying their resource forks (I guess that was the problem).
Copying, backing up, etc. works fine on the CLI as long as you use ditto -rsrcFork instead of cp

ditto preserves resource forks.
     
Agent69
Mac Elite
Join Date: Jun 2000
Status: Offline
Reply With Quote
Jan 30, 2004, 04:59 PM
 
One thing you could do is backup to a HFS+ disk image and then put that disk image inside a ISO disk image (this can be accomplished by using the command line in Mac OS X or on the Linux side. I know that CDRecord includes the tools to do it). Then burn the CD, which will include the disk image that that you can access. Not as easy as straight burning but it could be useful. (Of course, this will require mount the disk image file on the CD to access your backup.)

When I comes to applications, I keep copies of the disk images or archives they come inside of and burn them unto an ISO CD-ROM.No problems so far.
Agent69
     
Agent69
Mac Elite
Join Date: Jun 2000
Status: Offline
Reply With Quote
Jan 30, 2004, 05:02 PM
 
Originally posted by crayz:
I don't have an idea, I just wanted to say that I imagine some application's files(specifically databases, like maybe Entourage) may still use the resource fork to store info. I'd be careful.
I suspect that Carbon apps and Classic apps are most likely to use Resource Forks.
Agent69
     
nitebird
Fresh-Faced Recruit
Join Date: Aug 2002
Status: Offline
Reply With Quote
Feb 1, 2004, 04:17 AM
 
Originally posted by besson3c:
Is there anything left that doesn't have an extension, or otherwise relies on resource forks/type and creator codes?
Off the top of my head:

1. Finder aliases use resource forks.
2. If you use the "lock" or "stationery pad" feature, that is stored in "Finder Flags".
3. Internet aliases -- what you get when you drag a link from Safari onto the desktop -- use resource forks.
4. Custom icons for files that are not folders (or bundles or applicaitions) must be stored in resource forks. This would include images with thumbnail icons and any time you cut and paste an icon using Get Info.

I have verified this in v10.2 "Jaguar" and I understand that Labels in v10.3 "Panther" also use Finder Flags.
     
Brass
Professional Poster
Join Date: Nov 2000
Location: Tasmania, Australia
Status: Offline
Reply With Quote
Feb 1, 2004, 10:14 PM
 
Why don't you run SAMBA or some other file sharing service on your FreeBSD system, which can be mounted on the Mac OS X system.

Then there's a variety of sync tools which you can use on Mac OS X to sync between the two.

Only downside is that the sync has to be initiated on the Mac.
     
Gul Banana
Mac Elite
Join Date: May 2002
Status: Offline
Reply With Quote
Feb 1, 2004, 11:26 PM
 
NFS will solve all your problems, as well as bringing about world peace.
[vash:~] banana% killall killall
Terminated
     
besson3c  (op)
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Feb 2, 2004, 01:32 AM
 
Originally posted by Gul Banana:
NFS will solve all your problems, as well as bringing about world peace.
So, does NFS support long filenames?

Here seems to be the current state of affairs:

- NFS: not sure about resource forks and long filenames

- Netatalk: version 3 will support long filenames, but it is in alpha. Since Netatalk has been around for a good while, I'm certain it also supports resource forks

- Samba: not sure about resource forks and long filenames, person in this thread states that it supports long filenames. Does not litter .DS_Store files.

I've heard so many different reports as to which to use? I can use any of these, but which is the best suited for network backups?

Can somebody help me fill in the blanks here?
( Last edited by besson3c; Feb 2, 2004 at 01:42 AM. )
     
besson3c  (op)
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Feb 2, 2004, 01:35 AM
 
Originally posted by RayX:
You could create a Disk Image, copy it to the FreeBSD server, then have OS X backup to that image. That way you will preserve everything. For extra security, the Disk Image can also be encrypted.
I'm wanting to schedule this daily. This sounds like a good idea, if it will work with rsync/psync/some other OS X folder syncing thing, but wouldn't it be a performance drag to have to wait for the image to mount each time, and have to create this extra scripting to mount and dismount the image?
     
besson3c  (op)
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Feb 2, 2004, 01:40 AM
 
Originally posted by hotani:
have you looked at Deja Vu?

I tried backing stuff up with cron jobs and copying via CLI, but it would trash a lot of files... screwing up or completely destroying their resource forks (I guess that was the problem).

Deja Vu uses 'psync' which will keep these intact, as well as let you do mirroring and remote backups (like you and your BSD machine).

Currently I have it set up to mirror my /Users and a couple other directories once a day to a secondary hard drive.
Deja Vu looks very solid, and the author is working on adding Anacron support. When this occurs, all I'll have to do is write an anacron script to automatically mount the drive beforehand so it is present (unless the author is also adding this feature to the next version). When this happens, I'll gladly pay him. The GUI is fantastic.

I haven't gotten psync to work. I get errors like the following. Has anybody gotten it to work (it does work with DejaVu, oddly enough):

+f /Users/joe/Desktop/DejaVu/test.rtf
/Users/joe/Desktop/DejaVu/test.rtf -> /Volumes/192.168.0.5/test/test.rtf : err=-5000,file=filecopy.c,line=79 at /usr/bin/psync line 172.
     
Drizzt
Mac Elite
Join Date: Jan 2001
Location: Saint-Jean-sur-Richelieu, Québec, Canada
Status: Offline
Reply With Quote
Feb 2, 2004, 11:57 AM
 
My automatic backup setup is like this :

-Linux NFS Server with /home shared
-Panther client with /Network/SrvrName/home mounted
-Script executing daily as a user (with CronX) that does a CpMac (utility given with Developper Tools, ditto would do the job) from /Users/username/* to /Network/SrvrName/Home/username/Backup

MacOS X creates ._Filename files containing ress. fork. Linuxm hours later, take /home, makes a BZip2 file on an other disk and sends it via ftp offsite with other backup files.

If your mac crashes, you just have to reinstall MacOS X, NFS Manager, plug your mac to your NFS share and copy back your stuff! Also, if you have 2 macs plugged on your NFS share and one of them comes offline, you never lose more than 24h of productivity. (Happened to me)

Good luck!
     
absmiths
Mac Elite
Join Date: Sep 2000
Location: Edmond, OK USA
Status: Offline
Reply With Quote
Feb 2, 2004, 12:58 PM
 
Originally posted by Drizzt:
My automatic backup setup is like this :

...
-Script executing daily as a user (with CronX) that does a CpMac (utility given with Developper Tools, ditto would do the job) from /Users/username/* to /Network/SrvrName/Home/username/Backup
Do you not have problems with CpMac or ditto -rsrcFork? I have had both of them lock up on me for no apparent reason and had to kill the shell.
     
Drizzt
Mac Elite
Join Date: Jan 2001
Location: Saint-Jean-sur-Richelieu, Québec, Canada
Status: Offline
Reply With Quote
Feb 2, 2004, 02:09 PM
 
Originally posted by absmiths:
Do you not have problems with CpMac or ditto -rsrcFork? I have had both of them lock up on me for no apparent reason and had to kill the shell.
I don't use ditto, so I can't speak for it. Every problems I got where due to the NFS connection, not CpMac. I've got my NFS Server resetting disks sometimes (and haven't found a solution yet for it), and that made the NFS connection reset with it.

Otherwise it works like a charm.
     
hudson1
Dedicated MacNNer
Join Date: Aug 2002
Status: Offline
Reply With Quote
Feb 2, 2004, 03:07 PM
 
Originally posted by besson3c:
I haven't gotten psync to work. I get errors like the following. Has anybody gotten it to work (it does work with DejaVu, oddly enough):
I doubt this helps you but Psync works flawlessly for me in backing up my Users folder to a Firewire drive.
     
besson3c  (op)
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Feb 7, 2004, 02:07 PM
 
it appears that NFS doesn't salvage type and creator codes.
     
moki
Ambrosia - el Presidente
Join Date: Sep 2000
Location: Rochester, NY
Status: Offline
Reply With Quote
Feb 7, 2004, 05:41 PM
 
Originally posted by Agent69:
I would recommend doing a backup to a disk image first (as a precaution) and then give plain rsync a try.

Besson3c, are you the only user on your computer? I am only person who uses my Mac and I only back up files, along with the Address Book and Safari bookmark files. (I use IMAP, so I don't have to worry about backing up my e-mail.) I use Unix commands to do the copying, so I never preserve resource forks.
If you install the developer tools, you'll get a commandline tool called cpmac which functions exactly like cp, except it preserves resource forks. Can be quite useful at times.
Andrew Welch / el Presidente / Ambrosia Software, Inc.
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 06:06 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,