3

As you can tell this is no where near work related. I have an iMac G5 where my itunes is currently hosted, I have also just got a new MacBook Pro. What I want to be able to do is sync my itunes library from my iMac to my MacBook Pro, that way it can be accessible away from my home network, then if I make any changes to the itunes library (like change a track name) it will sync these changes back once I connect back to the home network.

My current itunes contains music, videos, podcasts, playlists and iPhone apps, I would also like iTunes to track play counts collectively between the iMac and the MacBook Pro.

4 Answers 4

3

This is pretty tricky, as there are several files containing iTunes metadata in addition to live running instances of iTunes. The trickiest of these to overcome is the fact that the running instance of iTunes does not write out data until it quits, so if you have running instances on both your iMac and MBP and you update the files underneath them, they will get lost. Further, paths are contained within the files, so this will not work unless you have identical paths on both machines (assuming you have not changed the defaults and have the same username, this would put the music in /Users/username/Music/iTunes/iTunes Music/ and the metadata in /Users/username/Music/iTunes/{iTunes Library,iTunes Music Library.xml}).

You can keep the music folder up to date on both by using rsync, but this only works cleanly if you either always add or delete items on one of the machines or if you only add items. If so, the two lines on the MBP would work:

% rsync -a /Users/<username>/Music/iTunes/iTunes\ Music <G5hostname>:/Users/<username>/Music/iTunes
% rsync -a <G5hostname>:/Users/<username>/Music/iTunes/iTunes\ Music /Users/<username>/Music/iTunes

You'll probably want to set up automatic authentication using public keys auth in SSH and put this in a cronjob.

To accomplish moving the metadata, I suggest you have a script running on both machines under cron which first determines if iTunces is running on the local machine and if it is not, it rsyncs the metadata files from the other server if the content on the other server is newer than that locally. Something like:

if [ `ps -ax | grep -v grep | grep -c iTunes` -ne 0 ] ; do
   rsync -au <otherhostname>:/Users/<username>/Music/iTunes/{iTunes\ Library,iTunes Music\ Library.xml} /Users/<username>/Music/iTunes
done

This still assumes that you don't make mods both instances with both instances being up continuously. Also, I have not tested this out, so there are probably some syntax errors or subtleties I'm missing.

1
  • This is how I keep both my iTunes and iPhoto libraries synced between 3 Macs. It seems to be pretty dang bulletproof. You'll probably want to use ‘-e ssh’ so that you don't have to have a rsync daemon running separately.
    – Scott Pack
    Jul 1, 2009 at 1:15
0

I used SuperSync and it did what I wanted from it, but I used it only with music and I couldn't care less for play counts, so I don't know if it does this.

0

I am using a tool called ChronoSync to do this right now, I just have my entire music folder (which also incudes the iTunes library metadata) synccing between the two computers. Works great for iPhoto as well.

0

MyTunesSync should work and has a 15 day free trial.

1
  • Note: it looks like MyTunesSync is now defunct.
    – nc4pk
    Sep 26, 2013 at 22:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .