How To: keep your iTunes library on an external hard drive
For more helpful how-to guides, check out the TUAW Tips, iPhone 101 and Mac 101 topics.
After discussing how my iTunes library is set up with a few readers in the comments on my First Impressions/2G iPod nano post, I figured this might be a handy tip for readers who find themselves running out of room to store an expanding iTunes library. My only machine is a MacBook Pro with a 120GB hard drive, but after installing ~ 40GB of the entire Final Cut Studio suite and other various software and projects, I don't have room for my ~ 35GB iTunes library.
I decided to do some experimenting a couple weeks back with moving and keeping my library on an external hard drive. There are obvious initial disadvantages to this, but after some tinkering and getting comfortable with iTunes' baked-in library management genius, this can be a pretty useful setup for those who, like me, are cramped for space but aren't willing to trash those albums you're too embarrassed use in a Party Shuffle playlist. This setup also has the inherent, and obvious, advantage of keeping your library on an external hard drive, so it's more or less already backed up - though I, with my paranoid data habits, keep a backup of my library on a second hard drive, and I now also use Scott's iTunes 7 backup tip (instead of a previous Smart Playlist system) to burn my library to DVDs (the lesson from someone who knows: your data can never be too backed up - ever).
Getting back on topic: read on for a walkthrough (from a very mobile notebook user) of how to move your iTunes library to an external hard drive. I'll include some tips on how iTunes is already one step ahead of this setup, as well as a few habits you might need to adopt when living la vida external-iTunes-library.
This isn't very difficult, but for those who aren't familiar with looking under iTunes' hood, I figured I'd lay this out and start from square one to make sure everyone can play along.
The one initial catch with running your iTunes library from an external drive is that you'll need a FireWire or USB2 drive for best performance; I have no idea how well this setup would perform on older machines with USB1, or if it would even work at all.
Now, if you're like most iTunes users, your library of music and movies (and now games) is stored locally on your Mac in ~/Music/iTunes/ (where ~ is your Home folder). With the latest iTunes 7 update, there are now (typically) two folders and two files in here (pictured above):
- Album Artwork folder (new with iTunes 7; missing from iTunes 6 and previous versions)
- iTunes Library (a database file iTunes needs)
- iTunes Music folder (this is where all your actual media like songs, podcasts, movies, and games live)
- iTunes Music Library (an XML library file iTunes also needs)
- if iTunes is running, quit it
- The only part of your iTunes folder you actually should move to the external hard drive is the iTunes Music folder (the one that holds all your media) itself; leave the Album Arwork folder, as well as the iTunes Library and iTunes Music Library files in place, locally on your Mac. Of course, if you want to back up your iTunes library for safe keeping (which I highly recommend, and again: Scott's iTunes 7 backup walkthrough is a great way to do it), including all your metadata, song ratings, song comments, etc., you should back up these local files in addition to your media
Fortunately, telling iTunes where its library now lives is a one-step process.
Go into iTunes' Preferences > Advanced pane, and click on the General tab. At the top of this tab is a record of where your library - your actual media - resides and, as you might guess, you can click the 'Change...' button to tell iTunes it's hopped the pond to external hard drive pastures. You simply need to browse through the Finder dialog and select your media library, wherever you put it, and click OK. That's it - iTunes writes the necessary changes to those aforementioned local database and XML library files, and you don't have to do any more heavy lifting. As long as your drive is still mounted and running, you can start playing your media just like before.
Unfortunately though, now that you're enjoying external iTunes library bliss, it's time to burst your bubble with a few gotchas to look out for. It's certainly possible to keep on trucking with this kind of setup (otherwise this would be a pretty useless post), but there are definitely some constraints to consider when going down this road.
The most significant catch is, of course, the fact that if you ever disconnect your drive - perhaps you're a mobile notebook user like myself - you obviously can't play any of your media in iTunes. Unless you own an iPod and enable the setting to manage its music yourself, you're pretty much out of luck here.
As you might expect, this also means that managing an iPod with this setup can get quirky too. If you sync your iPod with iTunes, and you connect it while your library is unplugged, iTunes will freak out and, after a few moments, warn you that it can't update your iPod because none of your media is present. However: this doesn't remove any music from your iPod, and your iTunes media will be playable once you connect your drive again. A lot of those 'file not found' exclamation points will appear next to your songs in the iTunes media list after a scenario like this, but don't panic: once you reconnect your drive (and/or restart iTunes; that one's up to you), all your media will play and sync just fine again. I've tested this with both a 5G iPod and a nano.
If you want to be able to plug in your iPod and exchange files and folders without iTunes automatically starting (and potentially bringing up the aforementioned quirks), uncheck the 'start iTunes automatically when this iPod is connected' option. This way iTunes only starts when you're good and ready to interact with your media and/or your iPod. These might not be easy habits to develop if you're used to iTunes running the show for you, but they're most likely necessary if you've read this far into the post and you're still interested in living the external library lifestyle.
But what happens if I import media, download podcasts or buy something from the iTunes Store?
This is one of the many areas where I must tip my hat to Apple's engineers, for they really knocked one out of the park when it comes to this situation.
Ever wonder what the Advanced > Consolidate Library menu option does? Well, it was made for just such a setup as your new external iTunes library. If your drive isn't connected when you start iTunes and, for example, import a CD or download a subscribed podcast, iTunes needs to put it somewhere, and it defaults to placing that media in your local ~/Music/iTunes/iTunes Music/ folder. "But TUAW, this is going to turn my library into a mess!" you exclaim from atop your desk chair. Fear not, intrepid reader, for the Advanced > Consolidate Library command is to the rescue! This ingenious command tells iTunes to copy any media it's imported to the local default media folder over to your recently customized external folder - once it's reconnected, of course. This is beautiful, because it's a two-click process to move all that new media over with the rest of your library and organize it properly, defusing a potentially complicated library mess.
However, a fortunate perk of iTunes' ability to have a split library personality is its ability to update an iPod with a new podcast or recently imported album while you're out 'n about, sans-external library drive. This has the potential to get confusing though, so for the sake of your organizational sanity, I hope you don't need your new podcast episode fix too often while you're on the go.
Finally, as far as reuniting your libraries is concerned, it seems that iTunes copies your new media files over to the drive when consolidating, instead of moving them. Every so often after you run this option, it might be a good idea to dig into your local iTunes Music folder and trash all those files, as they're just dead weight after a consolidation.
Be one with your external iTunes Library, young Padawan
This should be just about everything you need to cut the chord on your iTunes library if you're looking to save space on your Mac, or if you're simply a nut for using external hard drives. I've been poking around at this setup for about a month now, and I've been pretty happy with it. Aside from the catches I mentioned to watch out for, I was able to save almost 35GB of space on my MacBook Pro and make way for other projects, with room to spare. As always with feature posts like this, I'll try to answer any questions you may have in the comments. Enjoy!
Subscribe to Newsletter
Software Updatesmore updates
- IFTTT for iPad brings service/device mashups to your favorite tablet
- Daily App: Rormix brings indie music videos to your iPhone and iPad
- Pebble updates its iOS app with new apps, sharing options and v2.1 fix
- PSA: Pebble for iOS v.2.1 update contains critical flaw that breaks the app - Update
- Today in the App Store -- the best free apps, new apps and app updates
- Today in the App Store -- the best free apps, new apps and app updates