On the one hand, iTunes is very adaptive. It can handle a lot of upset in where files are stored. On the other hand, Apple provides NO help with moving an iTunes library between machines or between files stores. Their support site mentions using an iPod to make the move; a technique that that's roughly the equivalent of moving a house by chopping it into pieces and throwing it in a large bin.
There are many ways to move an iTunes Library. OS X Hints has mentioned a few. This is only my experience -- and it's very anomalous.
There are 3 parts to an iTunes Library. The first tow of these always travel together. The third can be anywhere, but the default location is set by iTunes. (Music folder, My Music, etc)
- iTunes 4 Music Library (PC version has the extension .itl): This is a binary file. This is the true iTunes database. I think iTunes gets the location of this binary database file from the plist file (Mac) or registry (PC).
- iTunes Music Library.xml: This is an ascii file. I think iTunes generates this from the binary file. It's used by applications other than iTunes. I believe one could delete this file and iTunes would regenerate it, I've not tested that.
- iTunes Music (may have other names): This is the folder iTunes uses for music it manages. If you import from CD, the compressed files are stored here. The iTunes database poins to music in this folder. In fact you can have many different folders with music on many different machines, all indexed by the iTunes database, but only one of them is actively managed.
There are two techniques. The first technique leaves the iTunes database in the default location (user folder if you're using a Mac). The second technique, which is riskier but is the one I started with, moves the iTunes Library database too.
Technique One: Move the music only
This is the more official technique. Configure iTunes so it manages music (keep library consolidated). Use Consolidate Library menu item in the Advanced menu. In the advanced preferences change the location of the library. When asked if you wish to move the files, say yes. iTunes moves the files. The database doesn't move.
Technique Two: Move music and database to a remote drive
Once upon a time I moved all my iTunes music from my iBook to an SMB share. Alas, I'm not sure how I did it! I've since moved that music to a different SMB share. I sort of know how I did that. So this is really a reconstruction of what I think I did. It is probably not correct, but it might provide some insights.
- Copy the iTunes music folder, database files and music folders alike, to the server.
- Create a shortcut (alias) to the new music files.
- Remove the default iTunes folder and replace it with the shortcut.
- Start iTunes. You may need to use the Advanced consolidate library feature. (Astoundingly I think I did this and it worked, but I don't see why it worked. I think iTunes may use relative paths in the binary database, and updates the XML with abolute paths.)
Technique Three: Moving to a new machine
I haven't done this yet. I think it would go something like this:
- Consolidate the library as in Technique One.
- Copy the database files and the music to the default location in the new machine.
- Start iTunes.
- Remove the shortcut.
- Copy the music files and database over to replace the shortcut.
- Fire it up and see what happens!