Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Move an iTunes library to a new machine Apps

After I got my PowerBook, I had a hard time figuring out how to transfer my iTunes library from my old PowerMac G3. I tried to export from the G3, then import the XML file from the PowrBook. Besides losing a few songs, I also lost tons of play counts and ratings.

For the past week, I've been looking for an effective solution that would keep all songs, play counts, and ratings. Here's the key: copy the files iTunes 4 Music Library and iTunes Music Library.xml from the iTunes folder in the source Mac to the iTunes folder on your destination Mac. Read the rest of the hint for the detailed steps I used...

What follows is my exact sequence. The source Mac referred to was my G3 and the destination Mac was the PowerBook.

  1. On source Mac: changed iTunes Library to point to a folder in an external firewire hard drive. (iTunes > Preferences > Advanced > iTunes music folder location)
  2. Chose Advanced > Consolidate Library on iTunes. This made sure that all files in my music library were copied to the firewire HD.
  3. Quit iTunes on source Mac.
  4. Copied the files iTunes 4 Music Library and iTunes Music Library.xml from the iTunes folder to the firewire HD.
  5. On destination Mac: changed iTunes Library to point to folder in external firewire HD containing all my songs.
  6. Quit iTunes on destination Mac.
  7. Found iTunes folder in the destination Mac. It is usually under your Music folder in your home, sometimes under Documents. Dropped the iTunes 4 Music Library and iTunes Music Library.xml files in there, replacing the older ones.
  8. Launched iTunes. All songs, playlists, and song info including play counts and ratings were there. It even synched with my iPod just fine.

I'm pretty sure you do not need an external hard drive to do this. You might want to just copy everything over file sharing straight to the destination Mac's hard drive. Or you might use your iPod if you have enough room in it to copy your music folder using the finder.

Step 2 (consolidate) is not necessary. I only did this to make sure I didn't lose any songs in the transition. If you've organized your music folder in any special way under the finder, you won't want to do this, since iTunes will organize all song files in its own order.

Before replacing your iTunes 4 Music Library file, make sure that you have your song files (.mp3, .m4a, .m4pů) in whatever folder iTunes preferences sees as the music folder in the destination Mac.

Good luck!

    •    
  • Currently 2.67 / 5
  You rated: 4 / 5 (9 votes cast)
 
[123,392 views]  

Move an iTunes library to a new machine | 19 comments | Create New Account
Click here to return to the 'Move an iTunes library to a new machine' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Move an iTunes library to a new machine
Authored by: abacsalmasi on Jan 14, '04 11:14:51AM

I've had to do this many times when formating a drive that has my home folder on it. I find the easiest way is just to copy the entire Music folder. When you have a fresh iTunes, simply open it up and quit it to create it's playlists/preferences and such. Then take the old Music Folder and replace the new one. Open iTunes again and everything will be there, playlists and all. This might be simpler than the posted hint.

---
My eyes, my eyes, these goggles do nothing!



[ Reply to This | # ]
Move an iTunes library to a new machine
Authored by: jaytay on Jan 14, '04 11:32:10AM

All I did was copy the iTunes folders from my old Mac to the Music folder on my new one. Job done.



[ Reply to This | # ]
Move an iTunes library to a new machine
Authored by: robarmo on Jan 14, '04 08:31:33PM

Its not just iTunes. You can copy your iPhoto Library to your new pictures folder, even your mailboxes from ~/Library/Mail/ and iCal calenders from ~/Library/Calenders to restore them onto your new set up.

Saved me a lot of messing.

Rob.



[ Reply to This | # ]
Move an iTunes library to a new machine
Authored by: sfn on Jan 14, '04 02:02:39PM

I have found that, that only works if the paths to the song files are the same (username, hd name).

Consolidate the Library to the default location if it is not already.
Copy the iTunes folder to the new machine while logged into the new machine, replacing the an existing iTunes folder.
Delete the com.apple.iTunes.plist file if one exists. This insures that the .plist file is newer than the iTunes 4 Music Library.
Launch iTunes.

iTunes sees a mismatch in song folder locations and corrects the paths using the newer location. No need to hand-edit the .xml file.

This works to transfer the Library and songs to a new machine, or a new user.

---
-sfn



[ Reply to This | # ]
Edit XML file
Authored by: nvdingo on Jan 14, '04 11:15:59AM

i usually just edit the XML file itself (after backing it up)
i globally replace the path name to the iTunes library folder, with the new one.

How this works for me is, consolidate library to new machine over network, copy xml file over, to new machine, and do the edit.

not that big a deal.
same thing works for iPhoto libraries



[ Reply to This | # ]
Move an iTunes library to a new machine
Authored by: rhythmicmoose on Jan 14, '04 01:05:33PM

Heck, I just FW disk mode the iTunes folder over to the other machine. Now if only there was a way to use the iPod as a go between. Add songs on one machine, sync to iPod, sync iPod on second machine and have songs show up on there. APPLE, ARE YOU LISTENING?!



[ Reply to This | # ]
Move an iTunes library to a new machine
Authored by: cudaboy_71 on Jan 14, '04 02:36:01PM

i seem to recall this was done intentionally for piracy reasons. same reason they felt the need to make the ipod's music directory hidden in the GUI. otherwise people'd be having ipod swap parties.

i'm sure they are listening...and doing an apathetic shrug.

---
if it aint broke, break it!



[ Reply to This | # ]
iPod is not the ideal go-between
Authored by: Lectrick on Jan 14, '04 06:13:44PM

I have 6 times as many tunes as fit on my 10g iPod. I wouldn't nearly be able to use it for that purpose ;)

---
In /dev/null, no one can hear you scream



[ Reply to This | # ]
Move an iTunes library to a new machine
Authored by: acet on Jan 14, '04 06:20:12PM

I've actually played with this a bit and have discovered that iTunes is actually suprisingly smart with how it manages the Library file. I've observed a few things:

- The 'iTunes Music Library.xml' file is not required for backing up your music library information or to move the library from one box to another. It appears that iTunes doesn't actually use this file to remember anything, but rather keeps everything it needs in 'iTunes 4 Music Library'. I presume it writes out the .xml file for integration with other applications. But I can replicate an entire library without copying it over and it works fine. The .xml file is then re-created when I exit iTunes.

- The pathnames do not have to match when moving a library from one machine to another. I have 2 seperate machines on which I keep my iTunes library synchronized using rsync. One one machine, my home directory is in /Users/joe while on the other it is in /Users/jmr. When I rsync the iTunes 4 Music Library file over from the 'joe' machine to the 'jmr' machine, I can clearly see that the '/Users/joe' pathnames are encoded in the file. However, as soon as I start up iTunes on the 'jmr' box, the entire library is *re-written* with the pathnames to be '/Users/jmr'. This is not something that could have been done without someone coding some intelligent routines to detect this and handle it gracefully! I was quite impressed when I noticed this. There's some serious coding skill & pride that went into iTunes, I feel.

So yeah, in summary, to copy the iTunes directory over, just copy the 'iTunes 4 Music Library' file and the 'iTunes Music' folder from ~/Music on one machine to another. rsync works nicely for this, I've been using it regularly for over 2 years now. Don't sweat pathname changes, iTunes handles it gracefully. Also there aren't any resource fork issues you have to worry about.




[ Reply to This | # ]
Move an iTunes library to a new machine
Authored by: grrr223 on Jan 14, '04 10:59:32PM

iTunes is actually VERY smart when it comes to managing your music library.

Here is what I did when I moved my 60 gig library from my old B/W G3 450 to my new 1.25 Ghz G4 PB. I think it's simpler than most of the methods presented here if your setup allows for it.

I have a small home network (just a router to split my cable modem) so I was easily able to share files between my two macs.

1. I shared the disk on my G3 that had the iTunes music library.
2. I copied my music library files to my Powerbook (I just happened to use iSync, but you can just drag and drop from your old home folder to your new home folder).
3. I mounted the shared G3 drive on my Powerbook
4. I opened up iTunes on the Powerbook (with the music library file from the G3) and it's smart enough to see the shared drive and play the songs as if they were stored locally.
5. I changed the path of my iTunes music library to my new home directory on my Powerbook, and made sure that "Keep iTunes Music Folder Organized" was checked.
6. I ran Advanced>Consolidate Library

After waiting a few hours for 60 gig of music to be transferred, I unmounted the shared drive from the G3 drive....

And, in typical Mac fashion...IT JUST WORKED!!!

Note: It actually doesn't even need to be as complicated as it was. The issue that the above method solved for me was moving my music folder from a folder at the root level of a second hard drive on the G3 to my home directory. iTunes handles all of it automatically without opening up a single xml file, without worrying about drive names, without, well, much of anything :).

I LOVE iTunes.



[ Reply to This | # ]
Move an iTunes library to a new machine
Authored by: lotas on Jan 15, '04 03:49:50AM

i wonder. i have a linux server with a samba share on it. unfortunitly, i have no firewire port on my mac, and no other drive big enough to store the music thats external. im upgrading the imac with a 6gb hdd. im guessing i could do this in a simular way, but telling the mac to have its music store on the samba share on the linux box (Apple share wont work, cant get NFS mounting yet under mac, so samba works on all!). can anyone see problems with this?

---
Lotas Smartman
www.lotas-smartman.net
www.the-hairy-one.com
www.lsn-blog.tk



[ Reply to This | # ]
IT IS ABOUT PRESERVING PLAY COUNTS & RATINGS!!!!!
Authored by: thereitis on Jan 19, '04 02:24:10AM

All precedent contributors missed the main point of the first posting: it was about to retain the original ratings and play counts.

"Besides losing a few songs, I also lost tons of play counts and ratings.
For the past week, I've been looking for an effective solution that would keep all songs, play counts, and ratings."


Are you all so poor readers?



[ Reply to This | # ]
IT IS ABOUT PRESERVING PLAY COUNTS & RATINGS!!!!!
Authored by: jursamaj on Nov 19, '04 02:08:44PM

Similarly, I'm trying to maintain playcounts etc., but in a different situation. I DON'T allow iTunes to manage my files. I do that just fine on my own, thanks. But I want to reorganize some files from 1 drive to another, without having to manually relink each one. At 1st, I thought "iTunes Music Library.xml" was going to do it: turns out to be output only, iTunes doesn't USE it for anything. The real data store is in "iTunes 3 Music Library" (adjust for version number). Unless somebody reverse engineers that, there appears to be no way to automate such changes.



[ Reply to This | # ]
Move an iTunes library to a new machine
Authored by: tf23 on Feb 20, '04 05:01:36AM

That's how I do it.

The linux FS has a 'music' share on it. I set iTunes to *not* copy files into itself. Then I mounted the music share. Dragged it into iTunes. iTunes scans all the files.

Now, when I rip a cd, it's written to my local mac's iTunes directory in my account's home dir. Then I copy everything it ripped from ~/iTunes/iTunes\ Music to /Volumes/Music/iTunes\ Music. Then remove the newly imported files from iTunes, and then copy whatever was just added to the music share back into itunes.

That way iTunes references the file from the share, not my local drive.





[ Reply to This | # ]
Move an iTunes library to a new machine
Authored by: sota on Apr 09, '04 05:04:40AM

Running iTunes off a Samba share works great. I've got a linux server with a massive drive and I keep my Music folder on it and iTunes preferences pointed to it. The copy and organize features of iTunes work fine as well.

FTP doesn't seem to work well enough/consistently yet under the Finder, WebDav works - but can get really slow opening/closing files after they're copied to the server (and likes to cache files locally onto my ibook), AppleShare on linux is a pain to setup and has its own custom database which the rest of the server doesn't seem to like, and I try not to go near NFS.

Samba shares are the best way to fly IMO.



[ Reply to This | # ]
Move an iTunes library to a new machine
Authored by: david-bo on Apr 23, '04 06:33:25AM
Is there noone here that is able to use the search function?

This is practially a copy of a hint I submitted 8 months ago, http://www.macosxhints.com/article.php?story=2003041911193115.

You can also find this hint on my webpage http://www.dsv.su.se/~david-bo/itunes.shtml

The original hint is much more detailed and describes why it works as it does.

---
http://www.google.com/search?as_q=%22Authored+by%3A+david-bo%22&num=10&hl=en&ie=ISO-8859-1&btnG=

[ Reply to This | # ]

Move an iTunes library to a new machine
Authored by: zulick on Jun 02, '04 11:29:40PM

Sorry - your hint was for a very specific special case and, while well written and informative, is hardly an easy way to accomplish the move if you don't have a ton of individualized organizing structure. This hint is a nicely distilled, easy way for a more regular user to move their library. Harping about lack-of-search-function-use is uninteresting and non-productive.



[ Reply to This | # ]
Move an iTunes library to a new machine
Authored by: Schmolle on Nov 18, '05 04:56:26AM

Other than just moving files, you need to be concerned about play counts, etc. Playlist definitions can most likely be copied over in some automatic way, but if they depend on historic play data, you're still stuck.

I have an article up on my site explaining exactly how to deal with this issues. The article is Windows centric, so I would appreciate feedback from successful attempts on a Mac.

The basic principle is that by emptying the database file, you can trigger iTunes to reread the data from the XML file. Now, the thing to so is to modify the XML beforehand.



[ Reply to This | # ]
Move an iTunes library to a new machine
Authored by: Kyle.Summer on Jun 08, '11 01:36:55AM
That thread is kinda old but I recently had to move my complete library from an old windows machine to my new mac. I have to say I was reluctant to follow the "manual" way as I am not so savvy with computers. Fortunately I stumble upon this simple step-by-step guide that walked me through the migration of my iTunes painlessly. I was so happy to copy my library so easily that I want to share this with you guys.

[ Reply to This | # ]