Subscribe to
Posts
Comments
NSLog(); Header Image

Facebook, Contacts, iCloud, and Mountain Lion

Earlier today in prepping my Mac Pro for sale, after I'd de-authorized the computer in iTunes and after I thought I'd turned off iCloud syncing ((Obviously I hadn't.)), I inadvertently selected all of my contacts in Address Book and deleted them.

Almost instantly ((Seriously, has iCloud EVER worked this fast when you wanted it to?)) my two computers and my iPhone lost all of their contact data as the change propagated throughout the iUniverse with blazing speed.

"No problem," I thought. "I'll just use Time Machine, click all of my contacts, and Restore them all."

It turns out that was a big problem, and I had to spend the next several hours manually importing 300 or so contacts one by one.

Read more for some images and a re-telling of the tale of woe.nnLet's use one card as an example of what happened across about 300 of my contacts. In truth I had about 1200 cards in Contacts, but about 900 of those were Facebook people, and after initially enabling Facebook contact syncing, I'd unchecked that box in "Mail, Contacts & Calendars" in my System Preferences. So while my Contacts had some Facebook "people" in them, I only ever really looked at the "iCloud" list.

In Time Machine, the left side of the Contacts app looked like this:

Contacts Sidebar

My wife's card looked like this (in Contacts in Time Machine):

vCard in Time Machine

Everything looked great. All of the data was there ((Including data from years ago when Entourage would store age and things inside the Notes field - hence the "age: 28" stuff.)). Yet when I clicked "Restore," this is what I got:

Imported vCard

Additionally, NONE of the groups on the left were present. I tried several ways of importing the "full" card back, including restoring cards one at a time. I tried all four options in the update/merge process - choosing the old card, choosing the new card, merging the cards, and, well, I forget what the fourth option was, but I'm sure I tried it as well. I also tried to get the Groups to restore, but was unsuccessful (and never was - I had to re-create them all).

The key lies in one of the non-blurred sections in the second photo. Where you see that there are two "cards" - a Facebook version and an iCloud version. I believe that Contacts and Time Machine was happy to keep restoring the much more limited Facebook vCard and was not even bothering to touch the iCloud vCard data, which it clearly had as it displayed it properly to me in Time Machine.

Eventually, I figured out a way to import the full card. The trick ((If you can call it that.))? I had to view each card separately and click the "Share" button and choose "Email" to "share" the contact via email. This created a new blank email with the vCard as an attachment. This vCard had the iCloud data and double-clicking it imported the data. But even then, I had to do this with a blank set of Contacts or only the Facebook data would import, even if I chose to "Update" the card.

Finally I ended up with the appropriate data for each of my 300 contacts:

Proper vCard

This card includes data that was not in the Facebook card:

  • Three phone numbers.
  • An actual address rather than just city and state.
  • AIM name.
  • Non-"@facebook.com" email addresses.
  • URLs to websites, blogs, etc.
  • Prefixes (I like to have "Mr." or "Mrs." or whatever on my contacts).
  • Notes (a few were new, most were from Entourage, but the old "category:"

I never did find a way to restore the groups without manually re-creating them.

Perhaps there was another way, but researching via the Internet didn't turn any up. I'd be happy if someone was able to post something in the comments to help anyone in the future, but I believe this highlights one of the big problems with iCloud: there's no way to really get at your data in the cloud. I would have loved being able to go to icloud.com, log in, and click a button to restore my contacts to where they were at 10:38am, before I accidentally deleted them all and gave myself three hours of unnecessary work ((I somehow managed to bork my iPhone in the process too as I thought perhaps I could restore a backup and recover my Contacts that way. Turns out, no, you cannot.))

TL;DR: When it comes to iCloud vs. Facebook for restoring contacts, the far more limited Facebook vCard seems to win every time unless you manually import each single contact via the "Share" button.

6 Responses to "Facebook, Contacts, iCloud, and Mountain Lion"

  1. Incidentally, one thing I did not manage to recover at all: custom pictures I'd set for some contacts. They were, by and large, over-written by whatever they'd chosen as their Facebook avatar or older Address Book avatars or something.

  2. [...] Erik Barzeski: Perhaps there was another way, but researching via the Internet didn’t turn any up. I’d be happy if someone was able to post something in the comments to help anyone in the future, but I believe this highlights one of the big problems with iCloud: there’s no way to really get at your data in the cloud. I would have loved being able to go to icloud.com, log in, and click a button to restore my contacts to where they were at 10:38am, before I accidentally deleted them all and gave myself three hours of unnecessary work. [...]

  3. I keep a reasonably recent export to vcard around. When I lost all my contacts in the same way importing the vcard file restored all fields.

  4. Have you tried getting the whole database at once from ~/Library/Application Support/AddressBook in your time machine backups?

    1. [quote comment="71123"]Have you tried getting the whole database at once from ~/Library/Application Support/AddressBook in your time machine backups?[/quote]
      Uhhh, stupidly I think I looked for a file named "Contacts" instead of "Address Book" even though I'm aware that this only recently changed in 10.8. 😛

      Still, looking inside (it's kind of a mess - it's not a single flat file of data or anything like that), I think I might be afraid that I'd restore the data and it would note the date(s) on them and would over-write them (delete them) once again.

      Perhaps if I went offline, found some way to "touch" every contact (Unix terminology - just change the last modified date somehow), and then went back online so that these changes were synced instead, that might work…

      But frankly at this point, having done all the manual work and having gotten my address book back to where I want it (except some missing profile pictures), I'm really not tempted to mess with it too much, if you know what I mean. 🙂

  5. @erik One thing you could have done in this case is indeed restore it offline, and then open Contacts, and export all the entries at once. Then later import them again if iCloud is being silly. It should actually be a 5 min process, but I can see why you would not be tempted at this stage 😉

    And yes, this whole database is a mess. A little story: when I switched on iCloud initially, it would delete all my 3000 entries as soon as I synced (actually one card was left!). I restored with my backup 'AddressBook' folder, and then synced again. Same thing. Again. And again. Then I noticed some logs in the Console about some CoreData faults. I tried the export/import trick, but it turns out all the export does is write the same CoreData database to disk in a file package (yikes!). Finally, I dug into the SQLite database with Base.app, and managed to fix those faults based on the Console log (it was a broken Group-Contact relationship). Then all was good and has been ever since. But what a mess.


Comments RSS

Leave a Reply


Warning: Undefined variable $user_ID in /var/www/vhosts/nslog.com/httpsdocs/wp-content/themes/nslog/comments.php on line 96

Please abide by the comment policy. Valid HTML includes: <blockquote><p>, <em>, <strong>, <ul>, <ol>, and <a href>. Please use the "Quote Me" functionality to quote comments.