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

Move an iTunes library to just about anywhere Apps
Hints have already been published for how to move your iTunes Library to another machine or another drive. The following hint describes a method which should allow you to move your music files to any location accessible via the Finder: another drive, a network share, etc., while maintaining all information such as play counts, playlist membership, cover art, etc. In order to do this, quit iTunes and back up your iTunes library by making a copy of these files:
~/Music/iTunes/iTunes Library
~/Music/iTunes/iTunes Music Library.xml
Move your music files to their new location. Figure out what the new location of your files is in file:// URI notation. The location will be something akin to this:
  • file://localhost/Volumes/DRIVE/PATH for another drive
  • file://localhost/Volumes/SERVER_SHARE/PATH for files on a mounted network share
I do this by dragging and dropping my music folder into an empty window in the Opera browser. Opera will perform the URL encoding for you and display the path in its location bar. This is important if you have special characters in the path, which need to be encoded (spaces become %20, for instance). There probably is a smarter way to do this.

Delete the ~/Music/iTunes/iTunes Library file and move the ~/Music/iTunes/iTunes Music Library.xml file to the Desktop. Then open the iTunes Music Library.xml file using a text editor. Run a search-and-replace in order to substitute the original file locations with the new locations. For example:

file://localhost/Users/username/Music/iTunes/iTunes%20Music/ becomes file://localhost/Volumes/SERVER_SHARE/PATH/

Now launch iTunes; it should show up with an empty library. Choose File » Library » Import Playlist, and select your newly-modified iTunes Music Library.xml file. Wait for iTunes to finish importing (this might take a while, depending on the size of your library).

Enjoy! One note of caution: you may lose your Podcast settings this way; you will need to resubscribe to podcasts afterwards. If you make a mistake, or something fails, you should be able to recover the previous iTunes state using the back up you created before you started.

This hint should be future-proof, because it's based on an official Apple Knowledge Base article.
    •    
  • Currently 2.43 / 5
  You rated: 3 / 5 (7 votes cast)
 
[47,016 views]  

Move an iTunes library to just about anywhere | 24 comments | Create New Account
Click here to return to the 'Move an iTunes library to just about anywhere' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Move an iTunes library to just about anywhere
Authored by: marook on Feb 06, '09 07:59:56AM

And the Simple solution would be:

1: Quit iTunes.
2: Move your iTunes Library to the new destination.
3: Open iTunes holding down ALT. Now Select your moved iTunes Lib
4: Go to Preferences->Advanced, click Change... and select the Music location here as well.

All done!

I've done this more than ones...

---
/Marook



[ Reply to This | # ]
Move an iTunes library to just about anywhere
Authored by: tatilsever on Feb 06, '09 09:19:17AM

Wouldn't your method move the the destination for new music and the library file (which is usually a few MB, as it only holds info, but not the actual media files.) to a new location, but leave the old files where they were? I think a fifth step is necessary:

- File -> Library -> Consolidate Library...

iTunes 6 and 7 used to ask if I wanted to consolidate when I moved the music location, but I don't think iTunes 8 does. You have to tell it to do so.



[ Reply to This | # ]
Move an iTunes library to just about anywhere
Authored by: marook on Feb 06, '09 12:35:54PM

Ahh, sure. You need to copy the existing music lib. to your wanted location..

---
/Marook



[ Reply to This | # ]
Move an iTunes library to just about anywhere
Authored by: postrational on Feb 06, '09 10:03:51AM

This would work, only if all your iTunes music files are inside the iTunes folder and are already managed by iTunes.
If you have files in another location and you sort them yourself, then it wouldn't work.



[ Reply to This | # ]
Move an iTunes library to just about anywhere
Authored by: tatilsever on Feb 06, '09 02:27:47PM

No. Your files could be scattered all over the place and iTunes can consolidate them properly. I just did it last weekend. Afterwards, you are then free to move your Movies folder etc. to somewhere else again. iTunes is able to keep track of moved files without any trouble.



[ Reply to This | # ]
Move an iTunes library to just about anywhere
Authored by: Alrescha on Feb 06, '09 11:23:28AM

I think the simpler solution is:

Go to Preferences->Advanced, click Change... and select the Music location.
Go to File -> Library -> Consolidate Library...

Take a nap while iTunes moves your music.

This method does require that you let iTunes manage your music.

A.



[ Reply to This | # ]
Move an iTunes library to just about anywhere
Authored by: robogobo on Feb 06, '09 09:51:11AM

....waiting to hear more feedback on this one, such as how it affects iPhone sync and such.



[ Reply to This | # ]
Move an iTunes library to just about anywhere
Authored by: postrational on Feb 06, '09 10:02:51AM

Dunno about iPhone, but iPod sync works perfectly. Takes a while to copy files over wireless from my home server, but copies everything that it should.



[ Reply to This | # ]
Move an iTunes library to just about anywhere
Authored by: slb on Feb 06, '09 11:58:44AM

Do this.
Copy the iTunes folder (Home/Music/iTunes) to the new location.
Delete (just move to trash) the iTunes folder from your Home/Music folder.

ln -s <new location of iTunes folder> space Home/Music folder <return>

Done.



[ Reply to This | # ]
Move an iTunes library to just about anywhere
Authored by: postrational on Feb 06, '09 01:39:56PM

Can't create symbolic links across different volumes. Would only work on the same computer, drive and partition.



[ Reply to This | # ]
Move an iTunes library to just about anywhere
Authored by: slb on Feb 06, '09 01:43:37PM

You better let my iTunes know - it's working as we speak and has been.
Different volume, same computer.



[ Reply to This | # ]
Move an iTunes library to just about anywhere
Authored by: Bassman59 on Feb 06, '09 04:58:40PM

Dunno 'bout you, but I have my iTunes library on a FireWire disk and I use a symlink to it from the standard location.



[ Reply to This | # ]
Move an iTunes library to just about anywhere
Authored by: slb on Feb 06, '09 05:11:42PM

Indeed.
I know the server model is out, but who wants it on a server?
not me :)



[ Reply to This | # ]
Move an iTunes library to just about anywhere
Authored by: postrational on Feb 06, '09 01:41:19PM

Can't create symbolic links across different volumes. Would only work on the same computer, drive and partition.



[ Reply to This | # ]
Move an iTunes library to just about anywhere
Authored by: Alrescha on Feb 06, '09 05:36:47PM

Ummnn.. the whole *point* of symbolic links is to work across volumes. On the same volume, you'd just do a normal link.

A.



[ Reply to This | # ]
normal link?
Authored by: sjk on Feb 16, '09 01:58:47PM

What do you consider a "normal" link? Both hard and symbolic links are normal to me, just often used for different purposes.



[ Reply to This | # ]
Move an iTunes library to just about anywhere
Authored by: kikjou on Feb 06, '09 07:54:40PM

Who wants to have the iTunes library on a server? Anybody who has a large music collection (and that does for movies as well). And now my entire household can listen to my music.



[ Reply to This | # ]
Symlink to a Server Volume
Authored by: asteryx on Feb 07, '09 09:40:06AM
I've used a symlink to a server hosted "iTunes Music" folder since iTunes version 4. It's a great way to share the same music files among our family.

The key is to make sure that your file server permissions allow the group to read & write to the music files. This allows the members of the group to update artwork, etc.

Note that when you use this method, each person's (account) has a different iTunes Library. Since the library is really only a sort of index on steroids to the Music folder linked above, one can customize playlists, ratings, etc. in their own library without affecting someone else's library. All of this requires iTunes to manage the music.

One minor issue... when someone adds music to the library (by purchase from the iTunes Store or ripping a CD, for example) the other iTunes libraries don't automatically update. The owner of the library must use File, Add to Library and locate the new music files to index.

All of the above syncs to two different iPhones (a 1st generation EDGE only, and an iPhone 3G) and wirelessly to an AppleTV. The AppleTV only syncs with one user account, not with all of the accounts.

As an aside, our family also uses a similar technique to share a single iPhoto library as well.

[ Reply to This | # ]

Symlink to a Server Volume
Authored by: jamietshaw on Feb 08, '09 03:44:25AM

Keeping computers synchronised from a central server is a bit of an issue. We have music on a NAS but with iTunes library files on each Mac so we keep our own ratings etc.

The Syncopation program mentioned earlier looks like it could help once you've ticked 'Import tracks without copying', and possibly turned off the attribute synchronising options, both in Preferences.

I wrote my own program a few years ago which you may have if you like, but it was and still is my first AppleScript/Xcode application so it's not particularly well written! It has to be run manually, copies your tracks into a text file, does a Unix find command to make another text file that lists tracks on the sever modified after a specified date, then does some more Unix stuff to compare the files and import the ones not in your iTunes into a playlist. If anyone does want my far-from-perfect program email me - jamietshaw at the 'googlemail' address.

Another thought was to use Folder Actions but they seem very unreliable.



[ Reply to This | # ]
Symlink to a Server Volume
Authored by: asteryx on Feb 08, '09 11:29:19AM
I agree that keeping the individual libraries synchronized is a problem. But I leave that up to the individual anyways. I don't care if my son marks a song or a movie with 1 or 5 stars.

My concern is that the .mp3, .aac, .m4b, etc. files are all in a single location. (These are then backed-up using both Time Machine and Mozy.)

The rest, for us, is just communication. I have to let my wife and kids know when I've imported new music or movies into the file location so they can update their individual libraries if they choose. Or I can remote into their systems and update their libraries if they ask.

[ Reply to This | # ]

Move an iTunes library to just about anywhere
Authored by: dwebb66 on Feb 07, '09 01:43:34PM

Can someone please verify that music selection in the other iLife programs still work? I tried this about a year ago and the other programs could not find the music. For example adding music to a photo slideshow.



[ Reply to This | # ]
Move an iTunes library to just about anywhere
Authored by: irc on Feb 09, '09 12:37:39PM
I can confirm that this works. I have no problem finding my music in iMovie after having done a similar over-the-top move of my iTunes library. I wrote up my trials and tribulations moving my library here:

http://iaresee.blogspot.com/2009/02/moving-your-itunes-8-library-to.html

There's some Perl to verify that you've moved all the files and didn't miss anything. That script could easily be modified to do the .xml file conversion to the new file:// path. I did just do a find-and-replace in vim though...

[ Reply to This | # ]
Move an iTunes library to just about anywhere
Authored by: asmeurer on Feb 17, '09 08:20:07AM

I got a new hard drive and copied my old iTunes data over from the old one, but it wasn't recognized. I tried copying and replacing the data, but iTunes would just revert it. I ended up temporarily renaming my new hard drive the same as the old one so that the paths of the files would be the same, then "touching" all the files in iTunes. This can be achieved by playing each file or, as I did, opening get info on the first item in the Library and holding down Command-N until the last file is reached (this takes some time, you might want to use sticky keys and a weight on your 'n' key like I did). Once the files have been touched in this way, rename the drive (or any part of the path, really) while iTunes is still open, so that it recognizes it.
This is a simple solution if you can temporarily make your new path identical in name to the old one.



[ Reply to This | # ]
Move an iTunes library to just about anywhere
Authored by: asmeurer on Feb 17, '09 09:19:04PM

On second though, maybe this didn't work so well. At any rate, I think the commenters below are correct, there is no need to do a search replace in the xml file. Just move the library in the preferences and do a consolidate.



[ Reply to This | # ]