Make a split library portable
The aim of this tip is help you get a split library into a portable form, or convince you not to split up the library in the first place.
A "split" iTunes library is one where the active library file is stored in one place, typically the iTunes folder inside your user's Music folder, while the content has been stored somewhere else like an external drive. Once a library has been split like this it becomes harder to move the library to a new path or computer without breaking the connection between the library and the media files. There are also unwanted side effects with a split library if iTunes is ever started up while the drive holding the media folder is offline, or Windows assigns that drive a different drive letter for some reason. iTunes will silently reset its media folder to the default path, a folder called iTunes Media in the library folder, and won't be able to access your media until you connect the drive and restart iTunes. iTunes will continue to use the default media folder for all new content until you change the location again via preferences, and then you need to remember to consolidate the media that is stored in the wrong location, and clean up any originals left in the wrong place.
Split libraries are usually created when a user runs out out room on the source drive and reads advice to move their media to a new media folder on an external drive. Rather than splitting the library seasoned iTunes users will move the entire working library to a new location and then connect to it there. When a library has been relocated in this fashion if you should start iTunes with the host drive offline, iTunes will complain that it can't find the library and ask you to choose or create one. At this point you can cancel, connect the drive and then start iTunes as normal. No preferences will have been changed.
A "portable" library can be moved from one path or computer to another without breaking the links between the library and the media, and being self-contained is much easier to backup. You can even move a portable library between Mac and Windows machines. If you backup a portable library by cloning the library folder to another drive then, should the source copy fail, you can start using the library on the backup device immediately.
Make a split library portable
Here are the typical layouts for the iTunes folders:
In the layout above right, with the media folder (everything in the red box) directly inside the library folder, in the "new" layout, and with all media consolidated (i.e. there are no items stored outside of the media folder), the library is considered to be portable. The principle difference between the new layout, once referred to as "iTunes Media Organization", and the old one is that iPod Games, Mobile Applications and Ringtones have been moved inside the media folder instead of being in the library folder, and artist folders have been moved down a level into <Media Folder>\Music. More recently Ringtones was renamed as Tones. There may also be regional differences.
You can rearrange things to make a split library portable by taking a number of small steps which don't break the library. Backup the current state of the library, or at the very least, the iTunes Library.itl file, before you start. See Backup your iTunes for Windows library with SyncToy for a suggested strategy (Windows only, but similar tools exist for OS X). In each case only a subset of these operations are likely to be required. Which depends on the starting conditions.
The basic non-fatal manipulations of an iTunes library are:
- You can move the library files and the media together as a unit if the media folder is a direct subfolder of the library folder, the library is in the "new" layout, and if all media is consolidated, i.e. is in the desired portable layout. Connect to the library in the new location with step d.
- You can switch the library from the old layout to the new one using File > Library > Organize Library... > Rearrange files in the folder "<Media Folder>". This option is not available if the library is already in the new layout.
- You can consolidate any media stored outside of the media folder using File > Library > Organize Library... > Consolidate files. This option may be available even if all media is already consolidated. Use it if you are not certain.
- You can connect to an alternate set of library files by holding down Shift (Win) or Option (Mac) when starting iTunes then using the option to choose a library. If you don't get a prompt to choose or create a library close iTunes and try again holding the key down until the prompt appears. In some cases having chosen an alternate set of library files will automatically change the path to the media folder. This is what we want in a "portable" library but if it happens when it isn't wanted you can reset the media folder to the correct path which should repair any broken links in the library.
- You can copy or move the library files (the 5 files listed at the bottom of the image above together with the Album Artwork and Previous iTunes Libraries folders) to a new location, then connect to them there with d. as long as the media stays put.
- If you have already copied or moved the media content from a subfolder of the library folder to a different location (via consolidation or manually, thereby breaking your library) then you only need to copy the library files for it to appear as if you have moved the entire library in the way allowed in a. I.e. just copy the library files into the parent folder of the media folder.
- You can rename the media folder to iTunes Media (if it isn't already) if the media folder is directly inside the library folder. Close iTunes, rename the folder, start iTunes. iTunes should update the media folder location accordingly.
- Having made a library "portable" you may need to take a final step of renaming the library folder to iTunes or, if the library files have ended up at the root of a drive, moving all of the library files and content folders down into a new folder called iTunes and then reconnecting to the library there with d.
After each change you need to open, test and close the relevant library before attempting another change. If a change broke the library, undo what you actually did or revert to using the previous set of library files. Make sure the correct media folder is being referenced.
Exactly which steps need to be used will depend on the starting arrangements of the library and the media. In many cases two or three will suffice.
When moving the library files from the default location to any other (in steps a. e. or f.) you can either correct the name of the .xml file or simply discard it. iTunes will automatically create the correctly named version of the file when it starts.
The steps above would normally be applied to a working library with no broken links (exclamation marks in the library) however step f. should repair a library if the media folder has been moved independently using Windows Explorer or Finder, after which steps g. and/or h. can be used if needed to apply the correct folder names.
Summary
In essence all you need to do to make a split library portable is copy the library files into the parent folder of the media folder on the external/secondary drive and use the hold-down-shift/option-when-starting-iTunes method to connect to it. Other manipulations may be required to normalize the library so that the library and media folders have standard names and the library is set out in the correct layout.
Network Performance
A library located on a shared network folder, NAS etc. may suffer from poor performance as each action in iTunes causes the .itl and .xml files to be updated. Should this be an issue then it is best to keep the overall structure of the portable library in place but copy the library files, Album Artwork and Previous iTunes Libraries folders back into a locally stored iTunes folder and connect to them there (e.). Before moving the library to a new drive or computer make it portable again by copying the library files back to the relevant folder on the network location (e. again) and accessing the library from that path at least once.
Manually Organized Libraries
Apart from steps b.and c. the operations can be applied to a manually organized library provided you already arrange your media inside the designated media folder while having the "Keep iTunes Media folder organized" option turned off. If you have kept your media outside of the iTunes Media folder until now you can assign the folder where it is stored as the media folder in iTunes preferences (Edit > Preferences > Advanced), and then proceed with moving the library files into the correct relative location.
iTunes media folder preference
It should be noted that changing the media folder preference in iTunes tells iTunes where to put new content that is added to the active library. It does not change which library database file is opened, nor will it make iTunes discover uncatalogued media or reconnect to media that iTunes cannot locate.
Opening the library on a different computer
Normally your portable library will open happily on the new computer, however in some cases iTunes may not be able to open the library for read/write access. In such cases see Repair security permissions for iTunes for Windows. Similar procedures exist for OS X. When moving between operating systems you find it easier to copy the library over a network. Windows libraries will generally be stored on NTFS drives which OS X can at least read, but since it cannot write to the drive the library would need to be copied to a Mac volume before it can be opened. Libraries created on OS X will normally be on an HFS+ formatted drive which Windows doesn't natively read or write. In either case it is possible to purchase write drivers for the other format, but it is an added complication to be aware of.
Relocate iOS device backups |
---|
On computers with SSD system drives any iOS device backups can take up a significant proportion of the available space. iTunes doesn't provide a mechanism for choosing where this backup data is stored, but it can be relocated onto another locally connected drive and a symbolic link or junction put in place so that it appears to iTunes as if the data hasn't moved.
It is possible to do something similar with OS X, but in that case it is ~/Library/Application Support/MobileSync/Backup that needs to be moved and then redirected. The redirection command in Terminal looks like this:
Where <New Volume> is the name of the volume you want to store the data on, and <User> is the name of your profile. If there are spaces in the path wrap with quotes or escape with backslash. It is probably easier to type in ln -s then drag and drop the two folders onto the command line in turn. |
^ Top
Related support documents
HT204668: Locate and organize your iTunes media files
HT201596: Open a different iTunes Library file or create a new one
HT201610: About iTunes library files
HT201979: iTunes: Understanding iTunes Media Organization (Document retired, archive version)