• 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

    bennyling

    If you use Chrome, check out the extension called Page Monitor: https://chrome.google.com/webstore/d...enbfclihhmmfcd

    Get notified when a webpage changes?

    bennyling Today, 11:00 PM Go to last post
    bartron

    I'm with Byrd.

    Max out the RAM and stick with Snow Leopard and you'll have a pretty decent machine to see you though. Hard drive replacements

    Shall I resurrect him? (iMac mid 2007)

    bartron Today, 10:51 PM Go to last post
    decryption

    Nah, I haven't. A bit pricey just for stuffing around, but I know the developers (just in passing, nice guys on Twitter) and have heard nothing but good

    iPad for offroad 4x4 mapping

    decryption Today, 10:37 PM Go to last post
    Byrd

    I'd max the RAM (4Gb would do), and pick up a fast 1TB+ 7200RPM hard disk for it; not worth spending a huge deal on an SSD when it costs more than the

    Shall I resurrect him? (iMac mid 2007)

    Byrd Today, 09:38 PM Go to last post
    soulman

    That looks cool. Have you used this Anthony?

    iPad for offroad 4x4 mapping

    soulman Today, 09:10 PM Go to last post
    fulltimecasual

    Bummer. Well, if mine starts cracking, i'll let this thread know.

    New iPad Cases - What are ya buying?

    fulltimecasual Today, 08:17 PM Go to last post
    ETHERSPIN

    Hi guys,pinched for pennies (off work with illness) but my formerly lovely iMac is not coping with life at all!

    its a mid 2007 20 or 21 inch

    Shall I resurrect him? (iMac mid 2007)

    ETHERSPIN Today, 07:25 PM Go to last post
    soulman

    Hey Scott,

    I understand now and, yes, that makes sense if you can make it work. There are some good CIS systems apparently, but I can't

    Printing images

    soulman Today, 06:27 PM Go to last post
    cactus68

    Byrd hi,

    have tried all that
    I have iStat
    CPU fan 3600rpm 34'C
    Hard Drive 1350rpm 46'C
    Optical Drive 701rpm

    HDrive 4 a iMac late 2008

    cactus68 Today, 06:21 PM Go to last post
    fulltimecasual

    Tis annoying! I bought Airfoil a long time ago for another reason though, and that works.

    Rogue Amoeba | Airfoil for Mac: Wireless Audio

    Spotify launches in Australia

    fulltimecasual Today, 06:00 PM Go to last post