Tuesday, August 11, 2009

How the iTunes Folder is Organized

For most users, your entire iTunes library is contained in a folder named “iTunes” located within either your Windows “My Music” folder or your Mac’s “Music” folder in your home directory.

This folder is specific to your own user profile on your computer. If you have multiple user accounts on your computer and log in as another user, you will be creating a new iTunes library in that particular user’s “My Music” or “Music” folder.

By default, this folder contains not only your iTunes library database, but also all of your iTunes media content. A sub-folder, named “iTunes Music” stores not only your music, but also music videos, audiobooks, podcasts, movies and TV shows. The location of this folder can be confirmed or changed in iTunes’ Advanced preferences:

iTunes Library.itl (file)—This is your actual iTunes library database. It contains just about all of the information about your iTunes library, including your playlists, your track metadata, ratings, play counts, file locations and much more. This file is absolutely critical to back up as part of any iTunes backup strategy, as it is basically the key to your entire iTunes world.
iTunes Music Library.xml (file)—This is an XML-based version of the main iTunes library database. Although iTunes updates this file, it is not actually read by iTunes itself except in situations where the main database needs to be rebuilt. The primary purpose for this file is to allow third-party applications to easily read information stored in the iTunes database itself.
iTunes Library Genius.itdb (file)—This is a database of the Genius information for iTunes 8. This file is not critical, as it can be easily recreated by re-running the Genius setup, but there’s usually little reason to not back it up.
iTunes Library Extras.itdb (file)—This is a SQLite database containing information related to CD’s that you have previously imported and looked up on the CDDB service. Like the Genius database, this is not critical, but there’s also usually little reason to not back it up.
Album Artwork (folder)—This contains a cache of all album artwork, both that which has been downloaded from the iTunes Store as well as artwork from the tags within your actual files. For automatically downloaded artwork, this is the only place it is stored, although you can theoretically re-download the artwork again from the iTunes Store. Ideally, however, you should include this folder in your backups.
iPod Games (folder)—This contains any Click Wheel iPod Games that you have purchased from the iTunes Store. Unlike the iTunes Music folder, this folder is always stored in this location and cannot be relocated through normal means.
Mobile Applications (folder)—This folder contains any iPhone or iPod touch applications that you have purchased from the iTunes Store. Again, unlike the iTunes Music folder, this folder is always stored in this location and cannot be relocated through normal means. Note that as you download application updates from the iTunes Store, the old versions are still retained in this folder, so this may grow over time. If you’re concerned about cleaning up this folder, it’s generally safe to delete the oldest versions of each application, but we generally don’t recommend that you try this unless you’re reasonably confident in what you’re doing.
Previous iTunes Libraries (folder)—When you update iTunes to a newer version and there are database structural changes involved, a backup of your pre-upgrade database is kept in this folder with the date appended to the file name. Over time you may have several older versions of your iTunes database stored in here. These files are relatively small, but if you’re concerned about space you can delete them as they are just backups and not actually used by iTunes itself.
Backing up the iTunes Library Database

With the above in mind, the simplest solution for backing up the iTunes library database is to simply back up the “iTunes” folder and everything in it. This will include not only the iTunes database itself, but also any Click Wheel iPod Games, iPhone and iPod touch applications, and downloaded and cached album artwork.

This will ensure you have a backup of your iTunes library database and related files, but whether or not it includes your media content will depend on how and where you have chosen to store it…
Determining where your media content is actually stored

One very important thing to keep in mind when planning an all-encompassing backup strategy is where your media content is actually stored. For the average iTunes user, this content will likely in your “iTunes Music” folder located within your “iTunes” folder, but it’s important to know that this is not necessarily the case.

Obviously, knowing where your files actually are is important to being able to back them up. Within iTunes’ advanced preferences, there is a checkbox labelled Copy files to iTunes Music folder when adding to library. This setting controls whether tracks you import into iTunes are copied into your “iTunes Music” folder or whether they are referenced from their original locations.

Depending on the version of iTunes that you first used to set up your library, this option may have been enabled by default if you were using iTunes on a Mac, and may have been disabled by default if you were using iTunes on Windows.

If this option is UNchecked, then chances are that any content you’ve imported into iTunes has been left in its original location. If you had specifically set or left this option off because you wanted to pre-organize your content into a single folder or set of folders before importing it, then this is not too much of a problem, since you know where that content is and can easily just back up that set of folders in addition to your iTunes folder.

However, if you didn’t realize that this setting was disabled and have simply been importing content from various locations with this setting OFF, then you will very likely have your media content scattered around your computer’s hard drive, and it may be difficult to track it all down to back it up.

In this second case, your best option is to consolidate your content into the iTunes Music folder so that it all lives within a single folder and can be backed up from there. Note that this folder can be the default iTunes Music folder or any other folder you specify. Our tutorial on Transferring your iTunes Library describes how to use iTunes’ built-in “Consolidate Library” feature to accomplish this.

The bottom line is that you should ensure that all of your iTunes media content is stored in a known location so that you can easily point your backup software at it and be assured that it’s all going to be included.

No comments:

Post a Comment