Today I had an interesting conversation with Chad, and he came across the same problem that I had.
I now am a convinced Mac user and use my self build PC Powerhouse sitting and collecting dust. Except for Web QA, I rarely use it. Just yesterday I thought, what a waste, this PC has 5.1 surround sound so I should be able to blow some decent music out and entertain the neighborhood with some of my eclectic music tastes.
So the situation I was faced with:
How do I get iTunes libraries synced between the the 2 computers (Mac and PC) without recreating everything and thus having twice the work.
At first I thought the XML file within the iTunes library would do the trick… but that was a dead end.
So here is a solution, which worked for me:
First you want to make sure that you have iTunes set to “Keep iTunes Music Folder Organized” !! This is half the rent !!
All that needs to be done then is to copy the iTunes Music folder from the Mac to the PC (provided the Mac is the Master and the PC is the Slave).
Then all that needs to be done is rename “iTunes Library” to “iTunes Library.itl”.
To make things easier to automate (I love automating things), you can go ahead and rename the file on your Mac to “iTunes Library.itl”; it works just as well.
We could stop here and have everything going, but if you have a similar setup like I, all work and music is done on the Mac, changes to the library are inevitable and always copying the whole thing when changes are made is inefficient.
So we could employ the Mac rsync command and execute it after every change or in frequent intervals.
Here is the command I use:
rsync -avz --force --delete --stats --size-only -e ssh --exclude="iTunes Music Library.xml" --exclude=".DS_Store" ~/Music/iTunes/* user@PC:'~/My\ Music/iTunes/'
If you look closely at the script you will notice that I exclude the “Mac Turds” and the XML file, as the XML file will be automatically recreated by iTunes from the “.itl” file.
Also make sure that you change user@pc to your settings: user would be the PC username and PC would be the WINS name or better the IP as Snow Leopard has some issues with WINS to IP translation.








