• The architecture of iTunes doesn’t lend itself to easy two-way synchronization. This can swiftly lead to the unpleasant situation many of us find ourselves in, where we have large, separate libraries on multiple Macs and differing content between them.

    Sure, we can share each others’ libraries over local networks with ease using Apple’s built in sharing, but that requires both Macs to be on the same physical network at the same time during use. If you’re like me, this is not enough; you want to be able to get to the same list of everything, from everywhere, all the time, and you want all of it to be regularly updated globally so no machine ever falls behind when new content is added. Am I being needy?

    This currently can’t be achieved using any setting, preference or utility in the iTunes or iPhoto applications themselves. Well, unless (for iTunes) you buy absolutely everything you own on the iTunes Store. For such people, iTunes 9 has brought us the handy new feature Home Sharing, which effectively achieves synchronization of purchased songs and albums across all configured devices. But how many people do you know who get all their media from the iTunes Store? Also, sadly, Home Sharing doesn’t address the synchronization of playlists, ratings, track counts, lyrics etc, only the songs themselves... in short, it cuts no kind of mustard at all.

    Can I Sync In Both Directions?


    We can’t do it in iTunes, but the bad news doesn’t end there. When it comes to using third party solutions, there are many difficulties in achieving a full two-way sync or merge of your iTunes data. I won’t cover all of these as this article is in danger of getting far too long, but I’ll offer a couple of quick examples of the problems you face with two-way sync.

    First, we rely on third party applications to sync the files for us. These apps can attempt to copy parts of the iTunes folder in both directions if you need them to. But if, for example, you base a two-way sync on the most recently modified of the of the two library files replacing the older one, many complications immediately arise. For example, you might spend all day ripping CDs onto one Mac, in turn adding new songs and albums to its library file, but then - just before syncing - move the window position of iTunes on another Mac. Since the window position of iTunes is actually stored in the iTunes library rather than its Preference file (strange, I know) this tiny change will suddenly make that library file the most recent of the two, copying over the other if a sync occurs.

    Second, there’s metadata. If you listen to a track twice on one Mac and three times on another at different times of the day, which track count data should the app choose to recognize when it syncs? It can’t merge the numbers together, so it will have to be told which data to look at in any such cases, and who makes the choice? There are endless scenarios like these which must be considered when looking at bidirectional merging of iTunes data. It’s a bag of hurt, I'm sure our Steve would say.

    The only way of achieving full synchronization at this time would be the ugly workaround of working out of a cloud version of you iTunes library all the time, using DropBox or a similar cloud service. Both machines would always be looking at copies of exactly the same files, so in theory all would be well. But you run the very real risk of things breaking in the long run as a concurrency issue or contention inevitably arises. Two machines competing for the same file and trying to update to and from the cloud at the same time is a recipe for disaster. Of course, many of us have iTunes libraries over 50GB in size, which hardly makes them suitable for cloud storage. Every time you update your podcasts, for example, there may be a few hundred megabytes to upload to the cloud and download to your other configured Macs. And every time you back up your iPhone, several gigabytes.

    The slightly disappointing truth is that the simplest and safest solution is to cut your losses and stick to a one-way sync. Choose one machine to be the ‘master’ for all library data for each app (this can be the same or different machine/s for each app) meaning you’ll make all changes to actual content on that machine and all other Macs inherit its contents when a sync occurs. This is the end goal you will achieve by walking through this guide.

    The iApp Sync Conundrum


    Why bother with automating these syncs at all? There are plenty of reasons. Here is a scenario I regularly find myself in:
    I’ve been listening to some great new music I’ve added to iTunes on my MacBook Pro (my daily workhorse) and feel like showing it to a friend at home on a following night on my Hi-Fi. When I go to play it back on my media centre, however (an Xbox 360 with media streamed to it from my iMac/media server) it’s not available as I haven’t copied the new album to the server yet; it only resides on my MacBook Pro. Makes sense.

    But I’d love for what I put on my laptop to be automatically added to my other Macs’ iTunes libraries. Is this not precisely why many of us have fixed desktop media servers in the first place; as an always-on home base for all our media? What better way to achieve this than to enable a global sync?

    Here I’ll cover my simple solution for maintaining and syncing libraries across multiple devices. There may be more elegant options and I invite your feedback on your own methods in the Comments section.

    But before we start, this method comes with a few caveats;

    1. You have to be happy to choose one, and only one machine to act as the master for all content in iTunes/iPhoto (as mentioned, this can be a different machine for each app - for example, you might use your iMac as master for photo editing and your MacBook as master for music).

    2. Your track counts and other metadata changes will not update bidirectionally. Meaning, if you've listened to Cock Rock Vol. 4 twelve times in a row on a non-master machine, the next time it syncs from the master the library will be updated and the track count change will be discarded. No-one will ever know just how much you love your cock rock.

    3. Your master will be the source of all updates. You want to rip a new CD? Do it on the master. You want to add album artwork? Do it on the master. Next time a sync occurs, all of this will flow through to all other machines you include in the sync. Naturally, you’ll want to choose whichever machine you use most for each app.

    4. Other users on your home network will need to be aware that any changes they make on a machine other than the master for each application will be wiped out automatically every time a global sync occurs. You really don’t want your wife working on editing an iPhoto album for 2 hours only to find her work vaporized the next day. Put simply, the master Mac is for creation, editing and maintenance - and the slaves are for consumption of that same media.

    5. Keep your software up to date on all machines; if you have iTunes 8 on one machine and iTunes 9 on another, they will not be friends with the same set of data. The same is true for iPhoto.

    6. Note that other users can continue to have their own libraries under their own user accounts, unaffected by your technical shenanigans. Your sync will target a particular folder, namely the iTunes/iPhoto library for one user account on each Mac.


    Of course, you could deal with all of this quite simply by regularly copying your iTunes or iPhoto libraries to other machines manually using an external hard drive, for example... but this is time consuming and you’re not likely to keep it up for long. Keeping up with regular maintenance is all about automation... so let’s get to work!

    ChronoSync


    ChronoSync is my weapon of choice for syncing the master Mac’s iTunes and iPhoto data to other Macs on my network. There are other scheduled backup solutions for Mac, but ChronoSync excels at other more advanced backup tasks, making it very worthwhile as a long term investment... I prefer to set myself up with a little more tool than I need for the job so I have that power to call on if I need it later.

    Any backup scenario you're likely to think of, ChronoSync will handle it. You can set your backups to kick off in a number of ways; for example, you could schedule it to sync automatically as soon as you get home and open the lid of your laptop (it doesn’t have to be time-bound, it can be triggered by network availability of the source machine). You can also set traditional schedules at daily/weekly/monthly increments, which is what is needed for the purposes of this guide. We will be setting up daily (overnight) syncs with both apps automatically closed before sync to prevent file locking/contention (automatic closing of apps requires some Automator+iCal trickery, which we’ll get to in a moment).

    Very importantly, Chronosync has the ability to look within package files and sync changes within the package itself rather than copying the whole file again when a single change to its contents is made. This is critical for syncing iPhoto libraries (which are each a single package file). Those of us with Digital SLRs or other high megapixel cameras will appreciate this... re-syncing your ridiculously large library every night over WiFi is a horrible prospect.

    Setting Up iTunes Syncs


    Setting up an iTunes synchronizer in ChronoSync is as easy as you could hope. You only need to have the application installed on one PC - it doesn’t matter whether this is the source Mac or the destination Mac.

    • Click File > New > Synchronizer and set one side to be the target and the other to be the destination by making selections from the Choose... dialog for each. Ensure that the data flows in the appropriate direction using the Operation drop down menu. Your actual file selection on each side should be the parent iTunes folder in your [User] > Music folder (unless you’ve customised this path), rather than any subfolder/s contained. In the example below, I’m syncing from my MacBook Pro (right) to my iMac (left):





    • Tick Synchronise deletions if you’re aiming for a full mirror on both machines (i.e. you prefer whatever you delete from the master Mac’s library to be purged from the slave libraries on next sync).

    • Leave default selections in the Options, Rules and Archive menus.

    • In Analyse, right-click any files or folders in your master Mac’s library you don’t wish to sync to the slave and choose Exclude. Excluded items will be marked with a cross in the Status column:





    • It’s very wise to exclude folders which undergo frequent changes to many (or large) files, provided they won’t be needed on the slave machine/s. For example, excluding the Podcasts and Mobile Applications directories is a great way to cut down your sync times, as these can go through dramatic changes in a single day as you download new Podcast episodes and apps/updates. This decision will naturally depend on how heavy your use of these media types is and which machines you want the media to be available on, but for myself (since all device syncing that utilizes these folders is done on my master Mac anyway), I prefer to exclude these.

    • Click the Schedule button in the toolbar and choose Daily. Set a precise time for syncs by choosing hours and minutes from the grid provided:





    • Try to make this late enough in the night (or early enough in the morning) for you to be sure you won’t be using iTunes or iPhoto at the time, as if you are, you’ll be rudely booted from the application prior to sync (thanks to a scheduled Automator action we’ll set up in a moment).

    • Click OK - You’re done!


    Setting Up iPhoto Syncs


    iPhoto sync can be set up the same way as for iTunes, with one proviso; to select both the source and target libraries from the Choose... dialog, you'll need to check the option ‘Allow package selection’:


    Without checking this preference, it’s not possible to select the iPhoto Library for sync, as the iPhoto Library is a package file. As already described, Chronosync is smart enough to treat the package as a folder with real subfolders rather than a single file, so when changes occur to a part of the package it doesn’t need to re-sync your entire iPhoto library. As for iTunes, select the parent folder (the package file itself) from the Choose... dialogs rather than any subfolder/s contained.


    Scheduling can be set up in the same way as for iTunes and you'll only need stagger their times by a single minute; even if the first sync is still in process when the second sync is scheduled to begin, the second will politely wait until the first is complete before commencing.

    Wash, Rinse, Repeat


    You can set up as many synchronizations to as many different macs on your network in this way as you like by choosing different targets during setup. Simply add each sync to the scheduler’s queue.



    Use Automator + iCal to Quit iApps Before Sync


    Of course, none of this is any good if ChronoSync performs a sync while iTunes is still open on both Macs and corrupts the library file on one or both machines. File locking and concurrency issues are a very real risk and worth protecting yourself against.

    All we need to do to address this is automate the closing of these applications before each sync begins. This is easily handled with a combination of Automator and iCal:

    • Open Automator and create a new application. From Utilities, select Quit Application and drag it into the workflow, then choose iTunes from the Application drop-down.

    • Drag another Quit Application event into the workflow and choose iPhoto





    • Click File>Save and save the application as 'Quit iApps' or similar.

    • You now have an application that quits both iTunes and iPhoto on demand. Double-click it to test.


    Now all you need to do is get iCal to trigger this event at a scheduled time each night. For this, follow the steps below:




    • Open iCal and create a new calendar just for scheduled events (I called mine Automator and gave it a pale yellow colour so it won’t visually distract me from more important calendars).

    • Create an event at the exact time of your first scheduled ChronoSync synchronizer.

    • In Alarm, choose Open File and click Other, then browse to the application you created in Automator. I keep this in my Dropbox to make it easier to set up on multiple machines, and use MobileMe to sync all calendars so this event automatically occurs globally.

    • Set the time of the alarm to be 5 minutes before the event to give iTunes more than enough time to quit if the Mac is under heavy load when the event is triggered.

    • Set Repeat to Every Day. See completed event at right.

  • New Forum Posts

    torana355

    Upgraded to Ultimate this week

    Am I crazy to consider BigPond Cable?

    torana355 Today, 01:19 PM Go to last post
    Mongrel

    Hmm... I guess I am on my own.

    Finder won't search though a Samba share

    Mongrel Today, 01:12 PM Go to last post
    fan

    Try Sony 5600 receiver. I design million dollar Broadcast systems and I was amazed how good this Rx is. It has auto phase calibration and also IP switch.

    A/V receiver suggestions/advice

    fan Today, 01:10 PM Go to last post
    torana355

    Nice speaker selection, you have the SE 3 floorstanders?

    Honestly sound is completely subjective, what you need to do is test out different

    A/V receiver suggestions/advice

    torana355 Today, 12:53 PM Go to last post
    vivid2

    And I thought the Q was a visual horror. This thing (as Kyte noted) has been hit hard with the ugly stick and has no viewfinder. Bulkier than some worthy

    New Pentax Mirrorless - K-01 - Announced.

    vivid2 Today, 11:35 AM Go to last post
    Chundermuffin

    I'd be calling the iAmbulance for that one.

    Fritzed iPad Screen :(

    Chundermuffin Today, 11:06 AM Go to last post
    digitalmvp

    I have solved the mystery...press and hold the touchpad. You will hear click like windows mouse. Viola....

    Magic Trackpad refuses to allow me to select my profile at Login on MBP

    digitalmvp Today, 11:05 AM Go to last post
    b00

    Hey Guys,

    Just wondering if there is anything i can do to fix the screen on my iPad before i take it to an Apple Store.
    Every

    Fritzed iPad Screen :(

    b00 Today, 10:20 AM Go to last post
    doofus

    Its a quirky looking design that seems somewhat compromised but I am sure the image quality will be very good.

    New Pentax Mirrorless - K-01 - Announced.

    doofus Today, 07:45 AM Go to last post
    emerson

    Thanks Torana, i'll check this one out too.



    I've heard some great things about the sound of Anthem amps but heard they

    A/V receiver suggestions/advice

    emerson Yesterday, 09:55 PM Go to last post
    jdm1503

    I am having problems with my new Mac Mini Lion Server and wish to reset the server back to the factory defaults and start all over again. Does anyone

    Reset Lion Server back to factory defaults

    jdm1503 Yesterday, 09:48 PM Go to last post
    ravage221

    Not too bad speeds for the 40/2

    Geelong ISPs/Phone Cos

    ravage221 Yesterday, 09:31 PM Go to last post
    moto51

    Am I right in saying the device you are seeking recommendations for is to be used on lunch breaks, not at uni because you have your Pro?

    Need a portable laptop/netbook

    moto51 Yesterday, 07:10 PM Go to last post
    maclab

    Because the battery issue is still a major problem.....better for some but not for all..

    iOS 5.1 beta3

    maclab Yesterday, 06:46 PM Go to last post