For most users, iTunes does a great job of handling all of the details of managing your media library for you, allowing you to manage your content through iTunes itself and not having to worry too much about the underlying files and folders that make up your iTunes library.
Unfortunately, this user-friendly approach has one serious limitation: When it comes time to move your iTunes library, it can often be a bit of a challenge to figure out exactly what pieces you need to move and how to go about doing this. Many iTunes users start out with a basic iTunes library and use the default settings to store all of their media content on their primary internal hard drive. However, as you add new content over time, particularly with the additional video content now supported by iTunes, you may soon find that your library threatens to take over your computer.
Another common scenario many users find themselves in is what to do when they upgrade to a new computer. Your iTunes library has been working just fine on your old computer, but you’re left with the question of how to get it over to the new machine so that everything works the way it’s supposed to.
Neither of these situations are at all uncommon, and fortunately it’s really not all that difficult to relocate your iTunes library to another hard drive or move it to a whole new computer once you understand the basics of how iTunes manages your media content and the options available to you.
This tutorial is intended for both the average and slightly advanced iTunes user and will provide the necessary information that you need to know about transferring your iTunes library onto an external hard drive, a secondary internal hard drive, or a whole new computer.
How iTunes Manages Media Content
Before we delve into the steps of actually moving your media content, it’s important to explain in some detail exactly how iTunes handles the management of your media files under the hood, what your options are for relocating these files, and the various pitfalls that you might encounter in this process.
The first and most important point is that iTunes is designed to handle all of the details of the underlying file system for you. By design, the user manages their content through iTunes, and ideally you never need to even look at the underlying file system, much less worry about moving files around. In this scenario, iTunes can even handle the relocation of your media content for you, making the entire process quite seamless.
This may not match every user’s style of media management, but it’s very important to understand how this affects the process of moving your media files to a new location.
The most important point to keep in mind is that once a media file is listed in the iTunes library, it is referenced from iTunes by the specific location (ie, full pathname) of where this file is located. Therefore, if you move a file, iTunes will almost certainly lose track of that file, and the result will be a broken link in the iTunes library.
This means that you cannot simply move your files manually to a new location and expect iTunes to find them after you’ve moved them, as it will still look for those files in their original locations. This one point alone has caused many users a great deal of grief, since repairing this situation can often be a tedious process of either manually adjusting the paths to hundreds of files or manually putting those files back into their original locations so that iTunes can find them again.
Fortunately, if you understand this and use iTunes and its related tools the way they were designed, you can ensure a smooth migration of your iTunes library to an external hard drive or even a completely new computer with minimal problems.
iTunes: The Database versus the Content
Another important point to understand: There are really two components that we are concerned about in this process, and these are somewhat distinct from each other in terms of where and how they are stored.
The iTunes Library Database contains the actual index of your media content. This is generally a file named “iTunes Library.itl” and several other supporting files, and by default lives in your Windows “My Music” folder or your Mac “Music” folder under a sub-folder named “iTunes.” This path is not affected by any iTunes preferences, and in fact could not be easily changed at all prior to iTunes 7.
The iTunes Media Folder contains your actual media content. Prior to iTunes 9, this folder was called the “iTunes Music Folder” but despite the name is included not only your music, but also audiobooks, TV shows, movies and podcasts —basically almost all types of media content managed by iTunes. By default in iTunes 9 this folder will be named “iTunes Media” and stored as a sub-folder under the iTunes Library Database folder, however this can be changed to any location you prefer via your iTunes Advanced Preferences.
Generally, when trying to conserve disk space, the iTunes Media Folder is what most users will want to move, as it contains the bulk of your library. By comparison, the iTunes Library Database is much smaller and is usually best left in its default location.
Standby to Prepare to Move: Checking your Preferences
Now that you’re armed with a basic understanding of how iTunes stores its media content, and knowing that you cannot simply move files around and expect your iTunes library to be able to find these files, it’s important to look at how your library is currently setup in order to understand what your options are.
The first step to this process is to review your storage settings under your iTunes Advanced preferences, which can be found by selecting Preferences from the Edit menu (Windows) or iTunes menu (Mac), and then selecting the Advanced tab:
The first option, “iTunes Media folder location” indicates where your iTunes media content is stored by default. Remember that this only includes the media content and not the library database itself. Whether all of your content is located in this folder is going to depend upon the next two settings found on this screen:
Keep iTunes Media folder organized determines whether tracks in your iTunes Media folder are automatically organized based on the track information found within each file. With this option enabled, iTunes will move and rename files within the iTunes Media folder as necessary into sub-folders by media type, with music organized in an ARTISTALBUM subfolder structure and each file named by its track name from the iTunes library. If this option is disabled, then files within the iTunes Media folder will be left with whatever name and sub-folder they were in when you first imported them, regardless of changes to the tag information within iTunes itself.
Copy files to iTunes Media folder when adding to library determines whether files that you add to your library are automatically copied into the music folder, or left in their original location. When you import new content with this option disabled, iTunes simply “references” the file from wherever you’re importing it, rather than making a copy of it in your iTunes Media folder.
Tracks copied into the iTunes Media Folder become “Managed” files in that iTunes will manage the location and naming of these files, whereas files that are not copied into the iTunes Media folder are “Referenced” files—iTunes stores a full path to the file, but does not actually take any further action with those files in terms of organizing, renaming, moving, or deleting those tracks.
Note that content purchased from the iTunes Store or ripped from CD is always stored in the iTunes Media folder—iTunes is actually creating new files in this case so it has to have somewhere to put them by default. Therefore, this setting only affects existing files from your computer that are added to the iTunes library using the File, Add to Library option or by dragging-and-dropping them into iTunes from another folder.
So why is all of this important? How you have configured these options is going to determine how much flexibility you have when moving your iTunes media content elsewhere. In a default configuration where all of your media files live within the iTunes Media folder location (“Managed” files), and have been organized by iTunes, the process of moving your library may be considerably smoother than for a user who has a bunch of “referenced” tracks living in various locations and possibly even on different drives.
While iTunes can move your files to a new location in either scenario, the only way to move a library that consists of referenced files is to actually convert them to an entirely managed library in the process. Users who have built their own file-system organization for their media content and want to preserve that layout will find the process of moving their content to be much more challenging without creating a whole new iTunes library and reimporting it.
iTunes 9 and Media Organization
iTunes 9 makes some changes to how media files are actually organized within iTunes. When iTunes was first released several years ago, music content was pretty much all it supported, and iTunes was designed with this in mind when it came to organizing your content. The top-level set of folders in your iTunes Music folder represented artist names from your music collection, with albums listed beneath each artist. This was fine back when it was only about the music, but over time new media types gradually appeared in iTunes, including audiobooks, podcasts, movies, TV shows, and now even iPod and iPhone applications. Despite this, iTunes stubbornly held on to its old style of organization, pigeonholing things like Movies and TV Shows into their own separate folders alongside the artist names for your music. Further, items such as iPhone applications and click-wheel iPod Games were left out of this folder entirely, being stored instead within the main iTunes folder, rather than the iTunes Music folder. With iTunes 9, non-music content is no longer treated as a second-class citizen in your iTunes library, and media content is now organized in a more balanced fashion. The old terminology of “iTunes Music folder” has been more appropriately replaced with “iTunes Media folder” and when you start a new library iTunes 9 will organize your media content into appropriate top-level folders by media type. Further, the Mobile Applications folder for iPhone and iPod touch applications and iPod Games folder for iPod click-wheel games now form part of the iTunes Media folder as well, instead of being stored separately with the iTunes library database.
If you’re starting a brand new library with iTunes 9, this will simply be the folder layout that iTunes uses from the start. However, if you’re coming from a previous version of iTunes, the old music folder style of organization will be left in place. This is done primarily to preserve backward compatibility, since you may have third-party applications that read your iTunes Music folder and expect to find your tracks organized in a certain way. We discuss changing an existing library to the new iTunes 9 Media organization a bit further on.
Fortunately, you can easily update to the new iTunes 9 Media Folder layout right from within iTunes itself. To do this, simply select File, Library, Organize Library from the iTunes menu, and you’ll be presented with a dialog box with the option to either Consolidate your files or upgrade to the new iTunes Media organization.
We’ll be discussing the “Consolidate Files” option later, but for now you can just upgrade to the media folder organization by simply checking the second option and clicking OK. iTunes will quickly go through your library and move all of your existing files around into the new layout. Note that only managed files that were originally stored in the iTunes Music folder will be moved—anything referenced from outside of the iTunes Music folder will be left where it is. If your “iTunes Music” folder was in the default location under your main iTunes folder, then it will also be renamed to “iTunes Media” in the process. On the other hand, if you had previously set your “iTunes Music” folder to another location the name will remain the same as it was before.
We definitely recommend upgrading to the new iTunes Media folder organization unless you have a very specific reason not to. The new layout will be much easier to work with, and most importantly your Mobile Applications and iPod Games will also be stored in the Media folder, making it even simpler to move and backup these items along with the rest of your iTunes media.
Moving your Content to a New Computer
If you’re simply looking to move your iTunes library to an entirely new computer, the process is actually quite a bit simpler than relocating the content, provided certain conditions are met:
- You are moving your iTunes library between two computers using the same operating system and iTunes version; and
- You plan to store the iTunes library database and content in the same relative locations on the new computer
If this is the case, then transferring your iTunes library to a new computer is quite simple: Just copy the entire iTunes folder and all sub-folders from your “Music” (Mac) or “My Music” (Windows) folder on your old computer to the corresponding folder on the new computer.
If you have changed your iTunes Media Folder location from the default, simply make sure you copy that to the corresponding location on the new computer as well. In other words, if you have your iTunes Media folder set to D:Music then you must copy it to D:Music on the new computer—remember that iTunes stores the full path to each music file in your library, so your music files must be in the same place on the new computer in order for iTunes to find them.
To actually copy the files between computers you can use any file transfer method you normally would for any other type of data, including an external hard drive or USB memory key, a home network between the two computers, or burning your iTunes data to CDs or DVDs.
Generally, minor differences in operating system versions will not be an impediment to moving your iTunes library directly over to a new computer, nor will moving to a later version of the same operating system (ie, Windows 2000 to XP, or XP to Vista). Likewise, you can transfer your library to a computer with a newer version of iTunes than the one on your original computer without any problems—iTunes will simply upgrade the database when you start it up on the new computer.
Note that your iTunes preferences are machine-specific, and you will need to go through and re-configure these the first time you run iTunes after copying your library over to the new computer. You can locate the preference file itself on the original computer and copy this over, however this is not recommended as there are frequently machine-specific settings in these preference files that may not translate properly onto the new computer.
If you have any content purchased from the iTunes Store, you will need to re-authorize the new computer for your iTunes Store account. Computer authorization is machine-specific. You should also make sure you DE-authorize your old computer if you no longer plan to use it with iTunes.
If you plan on putting your iTunes Media folder in a different location on the new computer you will want to read on for the process of relocating the iTunes Media folder itself. Whether you choose to do this before transferring your library to your new computer or afterwards largely depends on your specific situation. For example, if your media folder has been stored on a drive on your original computer that does not exist on the new computer, you will need to consolidate your library before moving it to the new computer.
Moving your iTunes library to a different operating system is also possible, and we will discuss this later on this article.
Moving Your Content to a New Hard Drive: The Wrong Way
A very common mistake made by many users is to simply try and move their entire iTunes Media folder to a new location and update the iTunes Media folder path in iTunes’ preferences. In some cases this may work, but in reality you will risk iTunes losing track of some or all of your media files in the process.
The reason for this is that iTunes stores the entire full path to each music file in its library database. If you move that file somewhere else, then iTunes won’t be able to find it, and the result will be a broken link to that file, shown as an exclamation mark in iTunes immediately to the left of the track listing:
If you try to select a track with a broken link, iTunes will notify you that it cannot find the file, and provide an opportunity to locate it yourself:
Selecting “Yes” will allow you to browse for the file, and iTunes will link the current entry to that specific file. This can be a viable solution for a few broken links, but you can imagine that this could become very tedious if you had hundreds or even thousands of files in this state.
Should you find yourself in this situation, the simplest solution is generally just to move your iTunes Media folder back to its original location. iTunes still has the complete path to each file in its database, so if you put the actual files back, it should have no problem finding them again.
Note that users who have a completely “Managed” library configuration may be able to get away with using this method to move their library, however it is still not the recommended solution. The reason this method will work in this case is because iTunes will actually look for any missing tracks in their default location under the iTunes Media folder path before deciding that the links are broken. So, if your tracks are organized in the way that iTunes expects to see them, then it will be able to locate them in the new location. However, this solution is rarely completely reliable simply because it is not uncommon for users with large libraries to have a few referenced files due to changes to iTunes preference settings or even inconsistent behavior with older versions of iTunes.
Consolidate: The Right Way
So, knowing that these pitfalls exist, what’s the best way? Remember that iTunes’ philosophy of managing your media is actually to insulate you from having to worry about the underlying file system. On the basis of this approach, it makes sense that it should provide the necessary tools itself to facilitate moving your library to a new location.
So in other words, rather than messing around copying/moving files through Finder or Windows Explorer, why not let iTunes deal with this for you? This is handled in iTunes through the Consolidate files option, access from the File, Library, Organize Library menu in iTunes.
What the Consolidate files option actually does it to gather all of the files listed in your iTunes library into the iTunes Media folder. It does this by copying any referenced files into the iTunes Media folder, renaming them with the proper track name, and organizing them into its standard file and folder structure. This option is at least partly intended to allow you to bring “referenced” files into the iTunes Media folder from various other locations in the event that you may have added them to your library with the “Copy Files” option disabled.
However, the only real distinction between a file that is “managed” and a file that is “referenced” is the actual iTunes Media folder path. Files in this folder are considered managed by iTunes, and anything outside is a “referenced” file. So, if you change the location of the iTunes Media folder to a new path and then use the “Consolidate Library” option, iTunes will happily copy all of these files into your new location, updating all of the file location information in the iTunes database in the process.
Performing the Move
To actually perform the move, start by going into your iTunes Advanced preferences, and changing the iTunes Media folder path to whatever new location you want your iTunes media files to be stored in. This will usually be an external hard drive, but it can be any valid path, including a secondary hard drive or even a network share:
Once you have updated the iTunes Media folder location, simply select File, Library, Organize Library… (in iTunes 8, this option was “Consolidate Library” and in iTunes 7 and prior, it was located on the “Advanced” menu):
You will be presented with a dialog box with the option to Consolidate files or upgrade to the new iTunes 9 media organization. Simply select Consolidate files and click OK.
iTunes will advise you that it is about to copy all of your content into the iTunes Media folder, and warn you that this cannot be undone.
Simply click “Continue” and iTunes will begin the process of copying the files into their proper locations and updating these locations in the iTunes library database.
Note that this process copies the tracks to the new location rather than moving them. Although the original tracks still exist, the iTunes library database is updated with the new location for each track, which makes the process difficult to undo unless you have kept a backup of your iTunes library database from prior to the consolidation. Making such a backup is certainly an option, although not normally required.
The other important note is that this will reorganize your entire library file system into iTunes’ default way of laying it out (ie, ARTISTALBUMTRACK.MP3 in the case of music files). This may not be a desirable option for those who have their media file system laid out in their own organizational structure, or who use other third-party applications that expect media files to be organized a certain way. Unfortunately, if you’re in this situation, there really is no easy way to move your iTunes media content without creating a whole new iTunes library and reimporting all of your tracks into the new library from their new locations.
Confirming and Cleaning Up
Once this process has completed, you should be able to confirm that the files have been copied to the new location and that iTunes is referencing them properly from there simply by selecting a track and choosing File, Get Info. The “Summary” tab for the file properties will indicate the physical location of that track, which should reflect the new iTunes Media folder path.
Since iTunes copies the media content rather than moving it, you will probably also want to delete your iTunes media files from their original locations.
Remember that this process only moves the iTunes content however. Your iTunes library database will still be located in its original location, likely on your primary hard drive in your “Music” or “My Music” folder, as described above, so while you can clean out the “iTunes Media” sub-folder from here once you’ve consolidated your library to another location, you should not touch any of the other files or folders in your main iTunes folder.
Moving the Library Database
If you’re simply interested in moving your files to a larger disk, there’s seldom any reason to worry about moving the library database, as it doesn’t normally take up a lot of storage space, and there are advantages to leaving this file on your local hard drive and simply storing the content on an external drive.
That having been said, if you do want to move the library database to another location, this is certainly possible as well as long as you’re using iTunes 7 or later. This must be done separately from the process of moving the content described above, and you’re best to run the “Consolidate” operation and move the content first, and then relocate the library database once you’ve confirmed that everything is still working properly.
To do this, shut down iTunes, and copy your “iTunes” folder (under your “Music” or “My Music” folder) to the new location. Keep in mind that by default, you may still have media content located in an “iTunes Media” sub-folder, and you probably don’t want to waste time copying this content over if you’ve already Consolidated it to another location, so you may want to exclude that one sub-folder.
Once you have copied the “iTunes” folder, including the “iTunes Library.itl” and any related support files and folders, simply restart iTunes while holding down the SHIFT key (Windows) or OPT key (Mac) and it will prompt you to either create a new library or choose a location for an existing library:
Simply click “Choose Library” and browse for the location that you copied the iTunes folder to. iTunes should start, and will be using that particular library database instead of the one from the original location. Once you have set this location, iTunes will continue to use it unless you change it again using the same method.
Moving the iTunes library database onto an external hard drive can be useful if you plan to move the external hard drive between multiple computers. It can also be useful to store it in a common area on a local computer for access by multiple user profiles, or even on a network share.
One word of caution, however: The iTunes database is not designed for multi-user access. If you decide to place it on a network share or in a common directory on a standalone workstation, always make sure that you do not have more than one copy of iTunes running against it at a time, otherwise you will risk corrupting the iTunes database.
Moving Between Operating Systems
Although the iTunes database format is the same for both the Windows and Mac OS X versions of iTunes, moving your iTunes library from Windows to Mac OS X or vice-versa is complicated by one other issue: The file systems between these two operating systems are completely different, so even though iTunes will be able to read the library database itself from the other operating system, it will not be able to make much sense of the paths stored in its library database. For example, where Windows uses drive letters, Mac OS X uses drive names, so there’s no way for Mac OS X to figure out what to do with a path like “D:Music.”
Fortunately, however, since iTunes will default to looking for any missing files in its normal iTunes Media folder, you can leverage this behavior when migrating your library to a different operating system.
To make this work, you must first ensure that iTunes has organized all of the files according to its default naming standard. This way, when you move the files onto the new operating system platform, iTunes will be able to find them in their default locations.
To do this, first visit your iTunes Advanced preferences.
If the “Keep iTunes Media folder organized” option is enabled, deselect it and click OK. Then, go back into your Advanced preferences and RE-select this option and again click OK.
This will tell iTunes to go through your iTunes Media folder and ensure that all music files are named according to its defaults. You will be shown a progress indicator while this is happening.
Once this has completed, perform a “Consolidate files” operation, as described earlier to bring in any referenced tracks that may exist outside of your iTunes Media folder.
Following these steps, your iTunes Media folder should be properly organized in the way that iTunes itself would expect to find it. You can then simply copy your entire iTunes folder and iTunes Media folder over to the new computer and operating system in the same way that you would transfer any other set of files. When iTunes starts, it won’t be able to find the music files by their specific location, but it will automatically and transparently “fall back” to looking in the default location where it would expect those files to be—in the iTunes Media folder. iTunes does this in the background transparently, so you won’t even notice it happening—things should just work.
Starting a New iTunes Library
Another option of course is to simply start a new iTunes library from your existing media content. In this case, you would start up iTunes with a new database and re-import your media content. Of course, this will not retain any playlists, ratings, play counts or other library metadata—you will in essence be starting over from scratch. You will also need to reload the content onto any iPod, iPhone or Apple TV devices you may be syncing, since these will also see the new library and require you to perform an “Erase and Sync” operation.
Starting a whole new library will likely be your best option if you have a primarily referenced media collection scattered through folders outside of iTunes’ own music folder and you want to preserve this file system organization. In this case you can simply move your media content to the new location, and then start a new library and import it with the Copy files to iTunes Media folder when adding to library option turned OFF, in much the same way you would have when you first imported your content to your original iTunes library.
Using an External Hard Drive and a Portable Computer
Once you have consolidated your library content onto an external hard drive, iTunes will continue to use that location for any newly imported or downloaded content, subject to your iTunes preference settings.
However, this creates an additional consideration for users of portable computers, since the external hard drive may not always be available. Fortunately, iTunes actually works around this quite well, so there’s no need to pack up the external hard drive when going out with your laptop.
Basically, when you start iTunes with your external drive disconnected, the iTunes Media folder path will temporarily revert to its default location on your local hard drive. This allows iTunes to run properly, although obviously you will not have access to any of the content that’s not already in that location. You will get broken links to any files that you try to access, since the external hard drive is not present. No need to worry, however, as this will correct itself once the drive is available again.
However, this does allow you to download new content (ie, import CDs, add files to your library, download podcast episodes, purchase content from the iTunes Store, etc). This new content will be saved in your local iTunes Media folder, and will be playable from there.
You can even sync your iPod (or iPhone) to your library in this state. “Missing” tracks (those with the exclamation marks beside them) will remain on the iPod, since they are still listed in the library. You obviously won’t be able to add content to your iPod that isn’t already there, but you could certainly sync any new content you’ve added while disconnected, since those files do exist on your laptop computer. Further, even ratings and playcounts will be updated in the iTunes library during an automatic sync.
This can be a useful way to import a few tracks off a new CD when you’re away from home and get them loaded onto your iPod without having to wait until you get home or having to resort to switching your iPod to manual mode.
Once you do return back home and plug the external hard drive back in, you simply need to restart iTunes and it will detect that its proper iTunes Media folder has returned, and go back to using that as its iTunes Media folder path. Any content you’ve downloaded or imported while you were away from the main library storage area can be transferred over simply by running the “Consolidate Files” option to copy those files over.
The way that iTunes handles this provides a very effective way to maintain a large iTunes library that is somewhat usable on the go without having to keep it all on your laptop’s internal hard drive.