Centrally locate iTunes and iPhoto Libraries

You took the bite, you bought two Macs. It is a dirty feeling that you can’t wash off as you had the fact you now I contemplating purchasing a Steve Jobs black turtleneck sweater. One thing ol’ Steve hasn’t given us Mac Geeks yet is a central server. We are disposed to store things in one mac and hope for the best. You, the reader, are in luck as this geek isn’t the garden bred Mac type, but rather a UNIX type. With a little command line voodoo we will centrally locate those libraries.

  1. If you plan on using a NAS (Network Attached Storage like TimeCapsule) then ensure AFP sharing is enabled. If you are using a SAN (Storage Area Storage like a Drobo hooked to a Mac via Firewire) ensure the machine is sharing the external drive.
  2. On the mac where the libraries are currently stored map to the share drive by going into Finder (home folder for example) and hitting Apple+K
  3. A dialog box will appear with a Connect to Server in the header. Type: afp://$ip/$share with IP and Share being your defined settings
  4. Once you are mapped open up the Terminal which can be found under Applications –> Utilities –> Terminal
  5. We are now ready to prepare for consolidation. Follow this article for consolidating your iTunes library before transferring: TMO Quick Tip
  6. Now lets head back to that terminal and sync the data to the share: sudo rsync -avEz ~/Music /Volumes/ShareDrive
  7. Go run a few miles, depending on the size of your library this will take awhile. After it is completed we are going to do the scary step of removing your current library. Yep, I said it. Drag that bad boy to the Trash and empty. Don’t delete the Music folder but rather all the contents. Be sure your data copied because if not you are going to hate me and start crying. Stop it, no one wants to see you cry.
  8. Now lets link that bad boy back so you can rock some tunes: sudo ln -s /Volumes/ShareDrive/Music/* ~/Music/
  9. Open iTunes and cross your fingers and toes it worked. At this point I expect you are river dancing or firing me an angry email.
  10. Now time for iPhoto! Same type of process: sudo rsync -avEz ~/Pictures /Volumes/ShareDrive
  11. Same as before, be careful and delete everything in the Pictures folder
  12. Let us now link again: sudo ln -s /Volumes/ShareDrive/Pictures/* ~/Pictures
  13. Open iPhoto — Nick FTW!

Why do it this way rather than the Apple Approved Method? This allows your machines to think that the data is there as long as the network is up. If you have a laptop when you are home iPhoto and iTunes work like a champ. Soon as you hit the road your computer acts like there never was a library. This gives you the ability to operate a few machines at once without either of them knowing the truth about your adultress libraries. The downside to this is being VERY VERY careful not to have 2 machines editing the iTunes or iPhoto libraries at once. It will suck, heads up.

Updated: