At work we are in the process of bringing down an old Mac server which hosts about 600G of files on two shares. These shares are used by a unit in our department which is a Mac shop. These files date back for years and there was some concern raised about moving these files as the last time it was done file associations were messed up. And that's how we get to this entry as I try to explain the problems I ran into this time and explain how to make this work for others who may run into the same problems.
If you're strictly a PC user you may wonder, how can you lose file associations when copying files? Does the .doc disappear. Well in some cases, and especially in older versions of Mac software, applications on the Mac don't save an .extension onto a file. Quark for instance would save the file as simply "A Quark File" with no .qxd. This means when you copy a file from one place to another it is possible to lose the associations and that's what happened before and that's what happened to me again.
I started by trying to think of the best way to copy this large amount of data from one server to another and decided to mount the Mac server, connect via AFP to the new server and use the command line rsync -va to make the copy. This was a fast nice way to make the move and I could even do it a bit ahead of time and then run it again one final time after shutting down the old share as the -a means archive which then does an incremental copy. This means it only copies the files that have changed. The biggest issue I had read about with rsync was that it couldn't maintain the permissions, but I was OK with that. What I did not realize until I began testing was that it lost all association information for files with no .extension.
A bit more digging and I found that rsync had another switch -E which tells it to copy the extended data for each file. This includes the meta data associated with files to determine it's file association. OK sounds great so I ran rsync -vaE this time from the server but again no file association got copied.
Now I was feeling a bit lost. Then I discovered something useful. The extended data for a file, like the Quark file we talked about, is actually interpreted and cached at the computer level. So if you are copying a quark file from a machine that doesn't have Quark installed, well that machine cannot interpret the extended data for a Quark file and so it has no way of copying the extended data for that file. That means that if you want to move data like this you are best to do it from a machine that has all the software installed that you may need for interpreting a files extended data.
So then I went back to a workstation and did the same rsync -vaE from one share to the next and it worked. Sad thing is for the older files, like old Pagemaker files, all that extended data has been long lost. It was lost on the last move and would be lost again as we have no machines now running Pagemaker that I could use to copy those files. All this would be avoided if the files had their proper .extensions, but hey I can't go back 10 years and tell people to save their data differently and so that information is simply lost in time.
Hope this saves someone some time.
I freaking love Tech Note.
ReplyDelete