With MobileMe coming to an end on June 30th I've been rushing to move my lingering family and friends over to iCloud. Sometimes that's not easy because to use iCloud your machine must be running OS 10.7 Lion and making the move to Lion means saying goodbye to any legacy Power PC apps. This week I finally finished the necessary upgrades to my Dad's 2007 iMac and after ensuring I had the proper backups flipped the switch on iCloud. At first glance, all was well and his iPhone, iPad and two Macs appeared to be sharing data flawlessly. However, the next evening he called to report some of his contacts were missing from his iOS devices and his computer (recently upgraded to 4GB of RAM) was running ridiculously slow. Upon investigation and logging into the iCloud web interface, I discovered that of his approximately 2500 contacts, only 855 were moved to iCloud and Activity Monitor showed Address Book was hogging his CPU. For some reason, many of his contacts were refusing to sync to iCloud and something was clogging up the pipe.
I spent about two hours troubleshooting the machine. Disabling iCloud and re-enabling but each time the machine would churn away for long periods of time without seeming to accomplish anything. In the days of MobileMe, you could reset either the MobileMe cloud information or the computer's information by flipping the sync direction in the System Preference. However no such option was available in iCloud. I had the good information on his iMac, as well as a backup file I saved before starting the transfer but wasn't sure what to do with it to allow the data to sync.
And then, a little voice in my head said, "the truth is in the cloud." Thinking back, I remember Dave Hamilton of the Mac Geek Gab used this phrase to describe the main difference between iCloud and MobileMe syncing. In order to avoid sync conflicts, iCloud considers the data set in the cloud to be "the truth" and although it will attempt to sync and merge information between devices, the cloud controls. At that point, I knew my best chance at resolving this issue was to upload my dad's 2500 contacts directly to the cloud and let the data rain down from there.
With the new iCloud web interface came some more advanced options to those with a sharp eye. One is the ability to directly import vCards to the iCloud site. You can find a little widget at the bottom left of the iCloud Contact's webpage. After severing ties between the iMac and iCloud i was able to erase all contacts from the iMac's local address book, then erase all contacts from the iCloud web interface which in turn removed all contacts from all other devices. This gave me a clean slate to work with. Though he now had no contacts whatsoever.
Using the vCard backup I created before migrating to iCloud I was able to re-import the vCards directly into the iCloud web interface and then repopulate all devices. I should note that having this vCard backup file really saved the day and I strongly recommend you make one on a regular basis and especially before making the move from MobileMe to iCloud or doing any major work on your contacts. Note that having the data in vCard format rather than the alternative address book archive format or otherwise having the data backed up through Time Machine or another method made a huge different here because of the ability to direct import the vCard into the web interface. In my case, I simply highlighted all contacts and within seconds they were exported to a single vCard file.
While re-importing I received a few error messages about problem cards and in total about 6 cards couldn't be imported. I suspect these were corrupt files that were causing a problem with the initial migration and once they were pulled out everything flowed smoothly. Once I accepted "the truth was in the cloud" and directly uploaded a correct set of contacts I was able to re-enable iCloud syncing and it's worked like a charm.
Thanks to Dave Hamilton for using this catchy metaphor for explain how iCloud worked. I suspect this method could be used to reset many of the iCloud services should the need arise.