Some tips for migrating data from NFS to AFP

Jul 22, '05 08:52:00AM

Contributed by: alblue

I'm migrating to Mac OS X 10.4 Server, and in the process decided to migrate from our legacy NFS share points to AFP share points. However, when Mac clients mount over NFS, they generate ._ files as well as the normal ones. So saving a file called HelloWorld.txt would result in a near duplicate file ._HelloWorld.txt in the same folder.

So I wanted to copy all of my User data onto a newly formatted HFSX partition, whilst preserving file creation times, owernship, and so forth. The problem is that using the built-in Mac OS X rsync tool resulted in a writefd_unbuffered error, and in any case, would just copy the ._ files faithfully to the new HFSX drive, which would then not be picked up by Spotlight (since it would probably look in the resource fork itself).

In the end, the easiest way to do it was to use the zip utility. Running it with -X -y -r was enough to preserve extended information (-X), as well as symlinks (-y) and recursively (-r). When unzipping it onto an HFSX drive, the ._ files are seamlessly merged with the meta information, which is then Spotlight-indexable. So, after a tortuous route copying files, formatting the drive, and copying back again, I can now start installing Mac OS X Server! Read on for a few things to note...

A few points worth noting:

You should also be careful when using rsync that comes with Tiger. It doesn't seem all that stable, and if you're used to doing -cav (the -a standing for archive, or everything) does not imply the -E option. Why Apple couldn't have made it the default whether you needed it or not is beyond me.

The plus side is with all this copying, Spotlight should have no excuse for not indexing the entire set of user content that's going on the hard drive.

Comments (2)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20050713185229928