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

One way to migrate an iTunes collection to another drive Apps
I use iTunes for not only my extensive music and audio library, but my vast video library as well. The collection had become so large that I needed to copy all the files to a new, larger drive. My troubles began with iTunes unintuitive linking. Library consolidation scared me, in that it would mess up my hierarchal structure. If I reimported my videos, all my meticulous metadata would be lost. Naming the new drive the same as the old worked, but would break the link if anything within the link structure moved or changed due to the inode reference database. In other words, I must reimport from the new drive (and thus lose all my metadata).

After days of experimenting, I came up with a solution that did the trick. With iTunes off, I copied all my music and video files to the new drive. I also copied my iTunes Library folder to the new drive as well (I prefer keeping all on one drive). I then unmounted my old drive and launched iTunes. Of course, iTunes could not locate the iTunes Library, so I pointed to the new location. I then saw all my music and videos as if all was well -- but alas, none of the links to the various media files were correct. (Here is where Spotlight should have automatically re-established the links globally; sigh.)

The great question now is, "How do I relink all the music and videos?" I could either take a year and relink each file one at a time or, I can delete all the iTunes files, reimport and take another year re-entering my metadata. Both approaches were unacceptable.

I was overjoyed to find that there was a simple solution -- I needed to keep all of the music/video information and organization intact and unchanged in iTunes. So I reimported all the files into iTunes. This created a duplicate of each file -- one broken, the other not. The wonderful thing is that all the album art, poster frames, and metadata notations duplicate as well! Since you cannot sort via the link warning symbol, the good news is that you can sort by "Date Added." Your unlinked files are now all grouped together, thus allowing you to shift-select all the unlinked files and delete.

The result is properly inode-referenced files on a new drive with all your original iTunes organizational structure and information intact.

[robg adds: This older hint offered another method, however, it relied on using the "consolidate music" setting.]
    •    
  • Currently 3.20 / 5
  You rated: 5 / 5 (5 votes cast)
 
[26,466 views]  

One way to migrate an iTunes collection to another drive | 37 comments | Create New Account
Click here to return to the 'One way to migrate an iTunes collection to another drive' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
One way to migrate an iTunes collection to another drive
Authored by: fanguad on Jun 18, '08 07:45:37AM

By "metadata" do you also mean things like play count, rating, etc? I would guess no. I'm curious what you mean by metadata, since things like album art are typically stored inside the file, or in your iTunes library itself.



[ Reply to This | # ]
One way to migrate an iTunes collection to another drive
Authored by: schneb on Jun 23, '08 11:59:40AM

By metadata I mean the "Grouping", "Track #" (which I use for keeping TV series in order of Season/Episode), and Comments (which I use for characters like Bugs Bunny, Elmer Fudd, etc. for my Looney Tunes collection)

As for the album art, I do not think iTunes writes such to the original file. It stores the art in another folder and links to it. You need a dedicated ID3 editor to do that.

As for Playcount, I am not sure that is preserved since I do not use it. However, last I looked, rating was preserved.



[ Reply to This | # ]
One way to migrate an iTunes collection to another drive
Authored by: edmechem on Jul 10, '08 02:16:15PM

iTunes *can* be made to store the album art inside each track's file itself. This is useful when you're looking at a shared library. At least with iTunes 7.6.2 (haven't tested on 7.7 yet), if the tracks you're looking at from the shared library have their album art inside the track, you'll see it; if not, you won't.

To do this, first do 'Show Artwork' (command G). Control-click on the artwork viewer (lower left corner of window), and Copy it. Next, select all tracks from that album (presuming they all have the same album art). Control-click on one of those tracks, and choose Remove Downloaded album art. It should disappear from both the viewer and coverflow. Lastly, control-click on the artwork viewer, and choose Paste. You'll see the progress bar as each track's file is written back out to disk, but containing the artwork.



[ Reply to This | # ]
One way to migrate an iTunes collection to another drive
Authored by: TF on Jun 18, '08 07:58:40AM

I haven't needed to reimport my collection into iTunes yet, but I fear that day. I'm sure it will come, either from data loss or hard drive migration or something else.

One thing I do to prep for the inevitable is to make sure all the metadata is embedded into the files. Music is relatively easy but you have to make sure the album art is embedded (applescript to do this. Is there another way?) For VIDEOS, what the original poster was most worried about, I use MetaX to tag everything. Freeware and a nice tool to look up and jazz up mp4 and mov files. Highly recommended. Once the metadata is embedded, dragging that file into iTunes is all you have to do!



[ Reply to This | # ]
One way to migrate an iTunes collection to another drive
Authored by: Perceval on Jun 18, '08 08:09:10AM

All the tags, but not Play Count, which is only in the iTunes Library.



[ Reply to This | # ]
One way to migrate an iTunes collection to another drive
Authored by: schneb on Jun 23, '08 11:37:58AM

I am the actual poster of this hint (don't know why it labeled me as "anonymous"). I had no idea it would generate this much attention, but I am glad for all the nice alternatives for others to explore.

Thanks for the pointer to MetaX! I really do want some kind of annotation in my movie files that will import to iTunes, so I will look in to it.

As for those saying, "Why not just do it this way", the fact is, I do not know UNIX that well, nor do I trust Consolidate Library. Also, I asked on MacOSXhints forum and none of you guys were there to give me these great comments. So I came up with my own solution. The best? Hardly. But it worked.



[ Reply to This | # ]
One way to migrate an iTunes collection to another drive
Authored by: schneb on Jun 23, '08 11:50:45AM

Rob fixed the Author - Thanks Rob!



[ Reply to This | # ]
One way to migrate an iTunes collection to another drive
Authored by: Perceval on Jun 18, '08 08:07:53AM
While my iMac was on repair, I used an old iBook G4 to replace it. It couldn't hold all of my iTunes Library, but all the podcasts and most of the music I often listen to.

On my iMac, my iTunes Music folder is located on a partition called "Music." For iTunes to find all of my music and podcasts on the iBook, I renamed the Startup Disk "Music" and placed the iTunes Music folder at the top level. Everything worked fine, since iTunes was looking for the folder at Music/iTunes Music.

But when I got my iMac back, and placed all of my iTunes Music folder in a "Music" partition, almost half of the items in the library weren't found. After trying many times to consolidate my iTunes Library, I realized by looking in the iTunes Music Library.xml file that most of the items from my library (the ones which weren't found in iTunes) had a wrong Location key: file://localhost/Music/iTunes Music instead of file://localhost/Volumes/Music/iTunes Music. And that was the problem: since I used "Music" as the name of the Startup Disk on the iBook, it was only looking for localhost/Music, which is the Startup Disk, instead of localhost/Volumes/Music, which is every other mounted disk on the computer.

There were about 4,000 missing files in iTunes. If I tried to re-import them, I would loose the play count. So sadly, I re-linked about 1,500 files manually, the other ones being either unplayed or not as important.

So the solution would have been to create another partition on the iBook and call it Music, instead of using the Startup Disk for my iTunes Music folder.

[There is one thing though: I have absolutely no idea why some files were marked as found while some were not on the iMac, I would have thought that my entire iTunes Library wouldn't be found by iTunes.]

[ Reply to This | # ]
One way to migrate an iTunes collection to another drive
Authored by: ms_t_rie on Jun 18, '08 08:43:40AM

I haven't tried this, but since it's an XML file, why wouldn't a search and replace on the XML data, correcting the location, work? I'm curious, I do have a drive that I want to move but have resisted doing so precisely for the problems others have mentioned. If editing the XML file works, then that seems like the simplest solution to me. I really don't want to import all the music again and delete duplicates, since it will take a long time for that to happen.



[ Reply to This | # ]
One way to migrate an iTunes collection to another drive
Authored by: Melle on Jun 18, '08 08:56:16AM

This does work, actually. You can search and replace in the xml file. There is one additional thing you'll have to do, which is to delete the contents of the matching .itl-file (not delete the file, just make it an empty file). This way, iTunes will 'regenerate' the Library based on the xml file.
If you don't 'zero' the itl-file, iTunes will ignore the updated xml-file and regenerate that in stead.
Hope that made any sense...



[ Reply to This | # ]
One way to migrate an iTunes collection to another drive
Authored by: ms_t_rie on Jun 18, '08 10:40:31AM

Thank you, that's probably the way I'll fix it when I move the drive :) Much easier since I'm planning to attach it to our NAS and while the wireless is reasonably fast, it's not direct attached speeds!

I'm not worried about play counts and such, so deleting the .itl file will work fine for me.



[ Reply to This | # ]
One way to migrate an iTunes collection to another drive
Authored by: fanguad on Jun 18, '08 10:12:08AM

As Melle says, this does work - mostly. iTunes will treat the files as being recently imported if you recreate the .itl file from the .xml file. This means that you will lose your play count/date added, etc. IIRC, this method keeps your ratings.

This method would also lose any metadata stored in the .itl file, like track artwork (if it isn't stored inside the files).



[ Reply to This | # ]
One way to migrate an iTunes collection to another drive
Authored by: Melle on Jun 19, '08 01:39:01AM

Could it be this has changed over the years? I did this a little less than a year ago, and my play counts/dates added/last dates played were all in tact, as far as I remember. Not sure about the artwork, though I believe that was all still there as well.
In fact, if I look in the xml file right now, that contains all the mentioned info. Note that the xml and itl file are roughly the same size as well. Though I do have to admit I'm currently at work, and can only check on a Windows box.



[ Reply to This | # ]
One way to migrate an iTunes collection to another drive
Authored by: fanguad on Jun 19, '08 05:05:39AM

I just tried this at work (Windows). It kept the play count and last played date, but lost date added.



[ Reply to This | # ]
One way to migrate an iTunes collection to another drive
Authored by: Perceval on Jun 18, '08 11:03:40AM

That's what I did first, and worked - sort of. All of my unfound tracks were found but duplicated (in the library, not the individual files), and the play count was reset.



[ Reply to This | # ]
One way to migrate an iTunes collection to another drive
Authored by: lancaster98 on Jun 18, '08 08:15:45AM

What's wrong with just using preferences to set iTunes to use the new location and then "Consoldate Library" option. Copies everything, files, metadata, playcount and all.



[ Reply to This | # ]
One way to migrate an iTunes collection to another drive
Authored by: fanguad on Jun 18, '08 08:22:57AM

Some people (myself included) don't like how iTunes chooses to organize the music collection.



[ Reply to This | # ]
One way to migrate an iTunes collection to another drive
Authored by: DocMan on Jun 18, '08 08:35:52AM

I still fail to see why it is so important HOW iTunes organizes the files.

To me the important thing is that iTunes knows where the files are and can find them when I want it to. Where the files are, and the structure they are organized by, is immaterial. iTunes can do all the work.

Doc



[ Reply to This | # ]
One way to migrate an iTunes collection to another drive
Authored by: fanguad on Jun 18, '08 08:42:21AM

I keep additional files in the same folder as the music (cover scans, etc). I don't always use iTunes - sometime I need to find a track by navigating the file system. Sometimes I play music on my Linux box, or share the music to my Xbox. At some point in the future, I might want to use a different media player than iTunes. For all these reasons and more, it's important to me to manually organize my music.



[ Reply to This | # ]
One way to migrate an iTunes collection to another drive
Authored by: azraq27 on Jun 18, '08 08:21:23AM

Wow, that was actually amazingly useful...

I've tried the whole consolidating thing, and I still have a big chunk of files that won't link. The best part about this hint is that it only duplicates files that aren't working -- the good songs don't get touched.

Finding all those exclamation point files was a little pain, though. "Find Duplicates" helped a lot.



[ Reply to This | # ]
One way to migrate an iTunes collection to another drive
Authored by: schneb on Jun 23, '08 11:47:22AM

Read the end of the hint...

"You can sort by "Date Added." Your unlinked files are now all grouped together, thus allowing you to shift-select all the unlinked files and delete."

The above will group all your "!" files together since they are older than what you have just reimported.



[ Reply to This | # ]
Yet another way to migrate an iTunes collection to another drive
Authored by: jschaffe on Jun 18, '08 08:50:25AM

Early on, I used the iTunes Consolidate feature to move my library to a dedicated drive (a second internal drive in my PowerMac G5, but it could be an external drive as well). Recently, I needed to move to a larger drive.

I:

1) Quit iTunes
2) Renamed my second internal hard drive, where the iTunes Library is located, from "Music HD" to "Old Music HD"
3) Attached the new hard drive in an external case
4) Formatted the new drive and named it "New Music HD"
5) Used SuperDuper to clone from "Old Music HD" to "New Music HD"
6) Used the Toast Utilities->Compare menu to verify the new copy (took hours, but I wanted to be sure!)
7) Ejected "Old Music HD" from the desk top
8) Renamed "New Music HD" to "Music HD"
9) Started iTunes and test-played a bunch of songs
10) Shut down the Mac, removed the old second internal hard drive and installed the new one
11) Restarted the Mac and again verified that it could play my music
12) Kept the old drive as a back up for a while

This seemed to work quite well without reimporting anything and all my data (play count, etc.) remains intact.

I'm not familiar with the "inodes" issue, although I'm guessing it refers to something in the file system. Since the iTunes library stores full path names, I don't see how that could be a risk with my method, though.

Jeff



[ Reply to This | # ]
Yet another way to migrate an iTunes collection to another drive
Authored by: schneb on Jun 23, '08 12:18:23PM
I'm not familiar with the "inodes" issue, although I'm guessing it refers to something in the file system.

You are correct, Jeff, it is something within the file system. This method indeed seemed to work fine with music only. However, add videos to the mix, and that is where you run in to problems. Keep them in the same place? All is well. Change the name of a folder, or move them, and iTunes will NOT track the change and the links will be broken.

[ Reply to This | # ]

One way to migrate an iTunes collection to another drive
Authored by: leamanc on Jun 18, '08 09:14:44AM

I recently needed to do the same thing, but just did it with a little Unix mojo.

First I copied my ~/Music/iTunes folder to my new drive, /Volumes/Bigdrive, via the Finder (drag and drop).

Then I deleted my ~/Music/iTunes folder (just drag to the Trash and empty trash).

Then I used Terminal to make a symlink in my ~/Music folder, like so:

ln -s /Volumes/Bigdrive/iTunes ~/Music/iTunes

Then I re-launched iTunes and it was like nothing had happened. No missing files, all the playcounts are still there, etc. One thing I did find interesting is that iTunes picked up on the symlink and notices that my iTunes Library is at /Volumes/Bigdrive/iTunes.

Quick, painless, and seems easier than this hint.



[ Reply to This | # ]
One way to migrate an iTunes collection to another drive
Authored by: jackster on Jun 18, '08 12:56:55PM

Maybe I am missing something here but the simple solution is as basically above.

Simple
1. Drag and drop your "entire" iTunes folder on new drive.
2. Hold down down the Option key while launching iTunes. It will give a dialogue to choose any "existing library" or to even create a new one. Choose existing.

Once set up in the external drive go to Preferences>General Tab and make sure the folder location is set properly to the new drive.

Done

I frequently move my entire library (over 230GB) to new external drives and it resides in a sparse image no less. I have never had any issues with album art, lists, ratings... This method also allows me to keep a separate smaller library on my MBP while traveling.

I hope that helps, but perhaps I missed something.



[ Reply to This | # ]
One way to migrate an iTunes collection to another drive
Authored by: robleach on Jun 18, '08 01:27:50PM

I would have done the above unix mojo solution, but I didn't know about the option-key iTunes start-up trick! I need to move my library to an external disk, so I'll be using that one soon! Cool. Thanks. Is there a way to duplicate a subset of your library in another location, like say I want everything on an external drive, but keep a copy of all the songs of a particular playlist or star-rating to all be on my internal drive as well. Is there a way to do that easily so that it stays up to date dynamically? I.e., if I add songs to either library, they sync up when the external disk is connected?

Rob



[ Reply to This | # ]
One way to migrate an iTunes collection to another drive
Authored by: jackster on Jun 18, '08 06:17:42PM

Great question Rob. Unfortunately, I don't know the answer.



[ Reply to This | # ]
One way to migrate an iTunes collection to another drive
Authored by: schneb on Jun 23, '08 12:14:36PM
"Maybe I am missing something here..."

I do not let iTunes organize my music or videos, they are kept in separate folders. In doing it this way, I ran into link trouble unless I named the new drive exactly the same as the old one. Then I had inode problems, that being, if I ever moved or renamed a folder, the link would be broken--iTunes would not be able to track it. There are more issues that required a complete reimport from the new drive. Hence the hint.

[ Reply to This | # ]

One way to migrate an iTunes collection to another drive
Authored by: DougAdams on Jun 18, '08 01:36:06PM

Careful using symlinks and aliases to stuff in your ~/Music/iTunes directory. Some apps expect the actual files and folders to be there, especially the XML file. Also, your com.apple.iApps.plist may not update correctly. This prefs file contains pointers to various iApp databases. If it doesn't update correctly, other apps may have trouble getting info from the correct XML file and you'll wonder why.

---
Doug's AppleScripts for iTunes
dougscripts.com



[ Reply to This | # ]
One way to migrate an iTunes collection to another drive
Authored by: jackster on Jun 18, '08 06:08:29PM

I agree Rob about the caution. Several apps such as Awaken (alarm clocks) and various iApps may rely on the iTunes folder. I have learned a couple of lessons along the way. First, as indicated above, have a second, if even small iTunes folder in place on your system even if it is not your main iTunes folder. To potentially circumvent any problems. Second, the Option key at iTunes start up has an interesting feature to it. iTunes/OSX remembers the last iTunes folder opened. As long as you launch into and out of the proper iTunes library there should be no problems. If you do this prior to opening other apps that may rely on it I have not run into any problems.

Also I should note, I used to run a huge iTunes folder with an "alias" folder in the Home User on a desktop to my external drive. Never once had a problem with that for about 5 years. Now that I have moved exclusively to a MBP I have changed my methods. It has been a simple solution.



[ Reply to This | # ]
One way to migrate an iTunes collection to another drive
Authored by: leamanc on Jun 19, '08 07:42:54AM

I understand all of you guys' concerns about using aliases. I have used them in the past, and you are right...some apps just don't like 'em.

I have had much better luck with symlinks though. In my experience, apps that access the filesystem in the "traditional Mac way" see them as the actual directory you're pointing too, and apps that are more "Unix-y" do well with them, of course.

I performed this operation on my Mac mini, which is basically my entertainment center. I do have a lot of apps that access the various iLife XML datafiles (Toast, EyeTV, etc.), and so far, so good.

In retrospect though, I should have just copied and held down the option key to pick a new iTunes Library. That sounds like the easiest and the most sensible way to do it.



[ Reply to This | # ]
Lost Metadata vs. Consolidation
Authored by: nickv2002 on Jun 18, '08 03:37:57PM

If this process looses date added as described, aren't you loosing that metadata? Perhaps it isn't important in your case but by using consolidate library you can preserve it. This hint only seems important if there is some reason iTunes must not organize your files, which seems pretty fringe.

Bottom line, stick with consolidate in most cases.



[ Reply to This | # ]
Lost Metadata vs. Consolidation
Authored by: asmeurer on Jun 18, '08 09:31:56PM

There is a script on Dougscripts.com called Copy Tag Info Tracks to Tracks which could easily be used to recopy the Date Added data over, or any data for that matter, as long as you can sort each corresponding file in the same order.



[ Reply to This | # ]
One way to migrate an iTunes collection to another drive
Authored by: wildness on Jun 18, '08 09:24:01PM

Um, why not just mount the new drive and move the files to it? iTunes will know where the stuff is whether it is launched or not. This was one of the first things I learned that was different with iTunes on a Mac from my Windows days where moving a file broke iTunes knowing where it is. I move video files and podcasts between drives all the time with no ill effects.



[ Reply to This | # ]
One way to migrate an iTunes collection to another drive
Authored by: juanfal on Jun 19, '08 12:04:53AM
One way to migrate an iTunes collection to another drive
Authored by: schneb on Jun 23, '08 12:05:52PM
Could have really used your input in the forum.
http://forums.macosxhints.com/showthread.php?t=90641

This technique was employed due to lack of proper direction and advice. Seems to have worked. But this Support page would have provided a better alternative to try first. Thanks for point to it. When I tried to search the subject at Apple, all I seemed to find was the Consolidate Library page. :P

[ Reply to This | # ]
One way to migrate an iTunes collection to another drive
Authored by: paleolith on Jan 29, '09 12:07:43AM

Thanks for the explanation! I needed to move my library from an external disk on an old computer to the documents folder on the internal disk on a new computer, with the same restriction that I don't want to let iTunes "organize" my files. The procedure worked perfectly!

Oh ... and I was moving from Windows XP32 to Windows Vista64 ... so the procedure is applicable far beyond MacOSX.

Edward

---
I see the brevity of truth.



[ Reply to This | # ]