December 7, 2010

Syncing multiple computers to a single itunes library

Kevin Cheng twittered recently "Cannot find any iTunes solution that lets me have an external master library, laptop w/ synced subset, and synced ratings/metadata."

Ahh.. the holy grail. I've been pursuing it for some time because I often orbit between 3 or 4 machines. I'd go further. I also want my iphones to share the synced data and to be able to sync on multiple computers. It can be done! Here's how.

Assumptions: I assume Macintosh. I assume normal locations for your Music folder and for the iTunes folder. I assume matching usernames on all the computers. I have 2 sets of instructions the first is for a fresh start (new library), the second set is for converting an existing library. Most importantly I assume a Dropbox account (they're free).

There are a couple of issues we have to get around:

1. Ratings and playlists are stored in local iTunes databases.
2. Song/Video metadata is stored in the actual media files.
3. iTunes tries to limit your syncing w/ iphones & ipads to a single library and freaks out if you switch libraries.

The solution is setting up a shared space that is automatically synced across computers and storing shared songs and metadata on the shared space.

OPTION 1: CLEAN START
Creating a clean Library from scratch.
(for an existing library scroll to the alternative method)

Step 1: Start Fresh.

a. Back up your iphone/ipod etc. by connecting it to iTunes and selecting the device while holding down the control key (choose 'Backup' from the menu.)

b. Quit iTunes and rename your iTunes folder 'iTunes-old'. This will serve as a backup if something bad happens (Remember I didn't make you do this! To restore everything, just rename the new iTunes folder that will be created 'iTunes-new' and rename the old folder 'iTunes'.).

b. Start iTunes and a new empty database will be created in your iTunes folder.

c. Uncheck "Copy iTunes files to iTunes Media folder when adding to Library" in the advanced prefs.

d. Quit iTunes.

Step 2: Set up shared space.

I use Dropbox. You'll need enough space to hold the subset of the collection you want shared on your satellite computer. Windows Live would probably also work. Some of the Macfuse based finder-ftp solutions might work. The important thing is that your shared space is indistinguishable from a normal Mac directory.

If you don't care about ratings or playlists and only care about metadata, then you're done. Just keep media files you want to share between computers on dropbox. Add the files manually to iTunes and the data will be synced on all computers automagically, but that's not what you want, you want more!

Step 3: Move your itunes database to dropbox:

If you want your ratings and playlists to match across machines, your database will have to live on the dropbox. To do this:

a. Copy your newly created iTunes folder to your dropbox folder. Right now it should be empty (no songs).

b. Create an alias of your iTunes folder, it should be named 'iTunes copy'.

c. Move 'iTunes copy' back to your Music folder and rename it 'iTunes'.

d. Now start iTunes. Go to preferences and look at the iTunes Media folder location. It should be something like '/Users/YOURUSERNAME/Dropbox/iTunes/iTunes Media'

Step 4: Add your music

Add your music/videos/etc, by dragging folders onto itunes. To add all your old music drag the 'iTunes Music' folder within 'iTunes-old' to the iTunes window and everything will be imported (or choose import from the File menu). These media files will be available locally.

For music you want to share across machines, create a folder called 'iTunes Everywhere' on Dropbox and drag folders of music into it. Anything not on dropbox will only be visible locally. If the music has been added to iTunes already you don't have to re-add it, you just have to move it, if it hasn't been added, you will have to add it.

When you are on a satellite computer, you will be able to play global files and files you add from that computer. Files on the main computer will have the little grey exclamation point next to them, but at least you can see them and see their ratings. You'll have access to all your playlists etc, but of course only local and global files will be able to play in each context (I recommend keeping a playlist of all your global files to keep things straight). Purchased music will be saved on the dropbox and available everywhere, unless you move it.

Step 5: Deal with your iphone/ipad/ipod

If you started fresh your phone will think you are on a new computer which means it will want to erase everything. You could copy your backup library id's over in a hex editor to fool itunes into being reasonable, or you could do a 'Restore from Backup' (control click the device in iTunes. The restore option is on the contextual menu). Either way it's a hassle.

Once your iphone is back up, you should select "Manually manage music." This will allow you to add files from the shared space or either computer. It's important to remember what context you are in when you are adding files. If you add a playlist from a satellite computer you must make sure that computer has access to all the songs on the playlist.

ALTERNATE METHOD: CONVERTING YOUR EXISTING ITUNES LIBRARY

Use this method if you want to convert your existing library, you'll need need to move your library files over to dropbox.

Step 1: Back up.

a. Quit iTunes.

b. Duplicate the following files in your iTunes folder and put them someplace safe: iTunes library, iTunes Library Extras.itdb, iTunes Library Genius.itdb, sentinel,iTunes Music Library.xml. .

c. Start iTunes and uncheck "Copy iTunes files to iTunes Media folder when adding to Library" in the advanced prefs.

Step 2: Set up shared space.

a. I use Dropbox. You'll need enough space to hold the subset of the collection you want shared on your satellite computer.

b. Create a directory on dropbox called 'iTunes Master' move the iTunes library files (iTunes library, iTunes Library Extras.itdb, iTunes Library Genius.itdb, sentinel) to it.

c. Create aliases for these files and move the aliases back to their original positions in your original iTunes folder.

d. Rename the files removing the "copy suffix". This fools itunes into thinking the files are in their normal location.

e. Start iTunes, kick the tires a bit, everything should be normal.

Step 3: Manage Your files.

For music you want to share across machines, create a folder on dropbox called 'iTunes Everywhere' and drag folders of music into it. Anything not on dropbox will only be visible locally. If the music has been added to iTunes already you don't have to re-add it, you just have to move it, if it hasn't been added, you will have to add it.

When you are on a satellite computer, you will be able to play global files and files you add from that computer. Files on the main computer will have the little grey exclamation point next to them, but at least you can see them and see their ratings. You'll have access to all your playlists etc, but of course only local and global files will be able to play in each context (I recommend keeping a playlist of all your global files, and playlists of files on each computer to keep things straight).

Step 4: Your iphone/ipod/ipad.

Select "Manually manage music" on your main iphone/ipod/ipad screen. This will allow you to add files from the shared space or either computer. It's important to remember what context you are in when you are adding files. If you add a playlist from a satellite computer you must make sure that computer has access to all the songs on the playlist.

It's not pretty, but it works (Earth to Apple: please make this easier!) If everything worked, you now have: A place where you can put music that is accessible globally, the ability to view all your playlists and ratings everywhere, and the ability to add songs and sync your phone/ipad from all your machines. As it should be.

Caveats: This setup works for me. It might not for you. I always shut down iTunes when leaving one computer for another because I assume things could get wonky if I have multiple live machines and multiple machines are syncing files in rapid succession. I back up religiously.

Do you have a better way to do this? If so, let me know? Edits? Leave a comment!

posted at 03:33 AM by raul

Filed under: macintosh

TAGS: apple (2) itunes (1) macintosh (3) multiple machines (1) syncing (1)

Comments:

12/08/10 02:17 PM

It worked! Couldn't be happier about this. Now if only my dropbox was bigger!

12/11/10 11:05 PM

exactly what we need here!

except, my eyes just got glazed looking at the lengthy instructions and the possibly long evening of dealing with those files...


12/12/10 11:00 AM

The post spells it out in detail but if you understand the basic idea (move your database and shared files to dropbox, keep local files local, it's not that bad). Took me about 10 minutes to get it all set up. I'm on day 3 in the new setup and really happy with the way it's working. Now it looks like I'll have to upgrade dropbox! Thanks Raul!

01/19/11 01:07 PM

Does this work for apps, books, podcasts, etc?

01/19/11 01:57 PM

Works w/ everything for me. You just need to make sure both computers are authorized and that the shared files are on the common folder.

02/19/11 12:03 AM

I *wish* someone could explain how to do this with over a terabyte of music that I've digitized. I'm tired of experimenting and having 1-4 versions of every song duplicated (or just ghosted) in my iTunes library. Alas...

02/19/11 01:19 AM

I have a terabyte and right now I don't think there is a way using this shared storage method.... one day though... one can hope.

08/18/11 08:50 PM

Raul,

Somehow, I never saw this when you wrote it. I was looking up more advanced ways to take advantage of Dropbox and stumbled on this. Imagine my surprise when the first words were my name!

Anywho, I never did post my final solution. I ended up using Syncopation (http://www.sonzea.com/syncopation/). I've heard mixed reviews on just about every app but this one seems to work if you're ok with having one machine be always on and hosting the full library. I have my master library on a machine's iTunes and then my main laptop has a subset of music. Importantly, when I add new music or rate music, syncopation propagates it back to the master.

Maybe when Dropbox and others get cheaper storage, we can do it for real!

11/26/11 05:28 AM

Here's my solution:

NAS drive with iTunes server. 3 macs that all can open iTunes at the same time and see the same library (through the iTunes share).

How to:

Have your library on the NAS, with the database there too... Allow the NAS drive to be shared across all 3. Point all your iTunes to the same library. Then all 3 iTunes can be master if need be (allowing iPhones/ipods to sync to all 3 too).

Then if you open iTunes on another mac and it says library is in use/locked, create a blank library to point to so you can open iTunes up, and in the side menu you have the nas share available. Repeat on all macs thus giving you play availability in each iTunes. All macs can play from the same library and all you have to do is choose a library on starting iTunes - really not a hassle, less of a hassle than closing down the other iTunes.

Add your thoughts: