Is iCloud deleting your iCal events? Here’s a possible solution

Like many Apple enthusiasts, I spent much of the day yesterday updating software. Mac OS X 10.7.2, iTunes 10.5, iOS 5, and… iCloud. I’ve been relying on MobileMe for a little over a year to keep my mail, notes and calendars (mostly) in sync. I was not an “early adopter” with MobileMe, so I escaped the first-day glitches that promted Steve Jobs to declare the system’s launch “not our finest hour.”

Less than a day into my experience with iCloud, I’d have to say that this launch also is not Apple’s “finest hour.” There have been numerous complaints today about iCloud mail outages (following what I have observed as several days of flaky MobileMe mail performance). But without a doubt the biggest issue for me personally has been related to iCal.

After completing the iCloud transition yesterday, to my dismay I discovered that all of my iCal events were duplicated! My MobileMe account and my iCloud account were both showing up, with all of the same events. Now, in retrospect, the correct thing to do would probably have been to go to Preferences > Accounts and just delete the MobileMe account from my iCal configuration. But is that what I did? Why, no, of course not! I proceeded to delete all of my individual MobileMe calendars. That appeared to do the trick. The iCloud calendars were still there, and every event was just showing up once.

But then this morning I sat down at my computer and discovered — to my horror — that everything was gone. At some point yesterday, when I wasn’t looking, MobileMe and iCloud synced up, and deleted all of my events.

Time Machine to the rescue!

I opened up my Time Machine backup from yesterday afternoon… sometime just before I had made the iCloud transition. I drilled down to [home]/Library/Calendars. (Note that Library is now a hidden folder, but I have my system set to show hidden files and folders*.) I found the multitude of .ics files that represent each individual calendar event, and dragged them into iCal. At first, things seemed great… until I noticed that one by one, the events started disappearing from my calendar again! Apparently iCloud didn’t like having these events show up in the calendar in this way — probably because it recognized them as being events I had “deleted” yesterday — so it “helpfully” removed them again.

AAAAARGH!!! How am I supposed to get these events back into iCal when iCloud just deletes them as soon as they’re added?! Then it hit me… you don’t have to put events into iCloud calendars.

iCal also allows you to created local calendars (“On My Mac”). My solution was to — temporarily — create new “On My Mac” calendars, add the events to those calendars, then export those calendars and import them back into the iCloud calendars. (Then the “On My Mac” calendars can be deleted.) It worked!

Here are step-by-step instructions to do what I did, in case you’ve found yourself in the same conundrum.

1. Find the old calendars in your Time Machine backup. You could open Time Machine to do this, but I like to just explore the disk in the Finder. (The remaining instructions assume you’re taking my approach.) The most important thing is to determine the date and time when your last “good” iCal backup would be. Drill down into that backup to your home directory (that would be something like [drive name]/Users/[username]), and then to Library/Calendars. (Remember that Library may be hidden; if so, see the footnote below.) You’ll see one or more weirdly-named folders. Each of these represents a separate calendar in iCal. Inside each is a directory called Events, and inside that are all of the events on that calendar, each with a filename ending in .ics. If you have more than one calendar folder, you can tell which calendar this is by selecting one of the events in the Finder; its icon will show its date and title. Keep this folder open; you’ll need to come back to it in a later step.

2. Create a new “On My Mac” calendar in iCal. Go to File > New Calendar > On My Mac. Call this calendar whatever you want. If you have multiple calendars, like I do, you’ll need to repeat this process for each of them separately (to keep your events from all getting jumbled together in one calendar).

3. Set the new “On My Mac” calendar as the default calendar. This can be found under iCal > Preferences > General > Default Calendar. When you drag events into iCal, it automatically assigns them all to the default calendar, so this is a pretty important step. Reassigning the events to a new calendar once they’ve already been imported can be a pain.

4. Drag all of the backed-up events into iCal. Go back to the Time Machine backup window you left open in step 1, select all of the .ics files, and drag them into the iCal window. Depending on how many there are, it may take a while for them all to load. Once they’re in, proceed to the next step.

5. Export the “On My Mac” calendar. It can be tricky to make sure you’re getting iCal to export the correct events. Click the Calendars button in the upper left of the iCal window (on the brown “binding” of the cutely skeuomorphic interface), find the “On My Mac” calendar that you’ve added all of the events to, and right-click (Control-click) that calendar to get a contextual menu. Click Export... and follow the prompts. I recommend saving the exported file to your desktop.

6. Set the appropriate iCloud calendar as the default calendar. This is a repeat of step 3, but this time you’re changing it to the iCloud calendar you want the events to be loaded into.

7. Import the exported calendar file into the iCloud calendar. Go to File > Import > Import... and locate the file you created in step 5.

8. Delete the “On My Mac” calendar. Once you’ve completed the import (and have confirmed that the events are not disappearing), you can safely delete the “On My Mac” calendar you created. Click the Calendars button in the brown “binding” again, right-click (Control-click) the “On My Mac” calendar, and select Delete from the contextual menu.

9. There’s no step 9!

* To get your system to show hidden files and folders, open up Terminal and type this: defaults write com.apple.Finder AppleShowAllFiles TRUE then hit Return, type this: killall Finder and hit Return again.

Comments

32 responses to “Is iCloud deleting your iCal events? Here’s a possible solution”

  1. Steve Avatar
    Steve

    Thanks a lot for this hint! I ran into exactly the same issue!!! Hopefully I made a backup before “upgrading” to iCloud, but : I made a calendar archive which turned out to not being the best idea … Each time I imported my archive, the sync process deleted everything, again and again….
    Here’s what I did : I deleted my iCloud account in ical, then turned off my internet connection so I could import my archive. Once I did that I could use your procedure, i.e. exporting each single calendar into a file on my desktop.
    Then turned back on my internet connection and added my iCloud account again. From here on, same procedure : simply imported each of my files into the appropriate calendar.
    Thanks again!

  2. Jason Avatar
    Jason

    Hey, I’m on my iPhone right now but for some reason my “on my Mac” option is gone and all my caladers are iCloud. However on my phone iOS 5 drop down both on my Mac and iCloud are duplicating events. In the actual calander app there is only one set and the option to turn on individual on my Mac calanders (causing duplication) so I turned off syncing the cal on my phone with iCloud and the drop down duplication stopped. But now I’m no longer syncing with iCloud. Help

  3. room34 Avatar

    Well, I’m not sure I understand exactly what you’re describing, but I noticed on my iPhone today that all of my events were duplicated. I clicked the “Calendars” button in the upper left corner, and I noticed that there are sections in there labeled “From My Mac” and “iCloud.” All of them were checked. I also noticed that “From My Mac” had duplications of all of the iCloud calendars, with the name of the calendar and then my MobileMe email address after it in brackets. That appeared to be the source of the duplications on the iPhone, at least… I unchecked all of the “From My Mac” calendars that are also iCloud calendars, and the duplicates are no longer showing up.

  4. Dean Avatar
    Dean

    This was an amazing help, thanks!

    How do I use Terminal to hide all the re-hide the lies that I 8unhide?

  5. room34 Avatar

    Repeat the instructions from the italicized footnote, but change TRUE to FALSE.

  6. andrew Avatar
    andrew

    Awesome- thank you for the help. Almost passed out when I lost my calendar entries. All up and running again.

  7. konrad Avatar
    konrad

    awesome, this safed me, i was ready to give up already. thank you :)

  8. Charlotte Avatar
    Charlotte

    Thank you sooo much…I kept having duplicates…even though MobileMe had supposedly been merged/converted to iCloud, both calendars were showing up in iCal…giving me duplicates, in fact – an EXTRA MobileMe calendar appeared, so I had events in triplicate.

    Now it appears, that after going to preferences, and disabling the 2 “icloud/MobileMe” calendars that were causing triplicate – it is NO LONGER syncing up w/ my phone??? Is there a way to tell which one of these 3 calendars would be the one that syncs w/ my phone??

    Under Preferences – all 3 are listed as iCloud calendars, BUT, under “Calendars” on my actual iCal (top left) two show up as Mobile Me Calendars and one shows up as iCloud….I of course kept the one that “appeared” as iCloud.

    Thanks…..

  9. room34 Avatar

    I’m probably not the expert to answer your questions, but here’s my best shot: first, you need to make sure the iPhone is updated to iOS 5 (if it’s not already) and I think during the initial iOS 5 setup process it asks if you want to sync with iCloud. (After that, you can probably make the necessary changes in Settings.)

    Also, I’ve found that I’m still getting duplicates on my iPhone, because the iCloud calendars are in there twice, once as iCloud and once as “From My Mac” with the iCloud account name appended to them. I turned off the “From My Mac” calendars so they don’t show up in the Calendar app, but the events from them do still show up in duplicate in the Notifications drawer. I haven’t found a solution to this issue yet but I’m just living with it.

  10. Charlotte Avatar
    Charlotte

    ….also, whenever I try to add an event I get an error code “507”…. It asks me to “Stay offline”, “revert to server” OR “Go Online” – and I just choose- stay offline, because when I choose anything else the error keeps coming back :-(

  11. room34 Avatar

    Well, as long as you stay offline, iCloud isn’t going to be able to sync the events. Are you using any other calendar services (like Google Calendar) by chance? That could be the source of the errors too.

    I haven’t run into this exact issue with iCal, but I did have a problem the other day when I was using Pages while connected to WiFi at a coffee shop. Their WiFi was kind of flaky, and after almost every keystroke, Pages would pop up a little “auto-saving” window for a second or two. It eventually stopped, but it was very annoying! I chalk this up to general bugginess with this new iCloud service that Apple is probably actively working on improving at this very moment.

  12. Charlotte Avatar
    Charlotte

    Thanks for your comments. I actually have the new iPhone 4s, so it does have the iOS 5. Of course – everything was PERFECT w/ the old MoblieMe and iPhone 4….I “had to have the newest phone”, which made me need to upgrade my software for my Mac desktop, iPad and laptop and it’s been a pain in the neck ever since.

    I just don’t understand why “MobileMe” is still a calendar on iCal (on my laptop), but isn’t a calendar on my Mac Mini desktop??? Oh well.

    Each devise is having it’s very own issue….I suppose I’ll just have to figure it out.

  13. room34 Avatar

    Good luck. Unfortunately all I can do is describe the problems I’ve had and the solutions I’ve discovered. I can’t speak for Apple and their continued challenges in successfully implementing cloud services. From what little technical knowledge I have of what’s going on behind the scenes, though, syncing is incredibly difficult to pull off with the ease of use and simplicity Apple’s attempting.

    That said, it does seem to me that what should have happened after upgrading from MobileMe to iCloud is a complete replacement of anything MobileMe-based with its equivalent iCloud service. Once I’m on iCloud, I should never see or hear or smell anything called “MobileMe” again.

  14. Charlotte Avatar
    Charlotte

    I agree!!! If I can’t have my old MoblieME back…don’t tease me by showing it as an option ;-)

    Thanks again, at least I know I’m not the only one w/ challenges!!

  15. Nathan Avatar
    Nathan

    I have a question for the future: Once everything is in iCloud? if iCloud messes up or something goes crazy when synching? will the previous iCloud data be backed up on time Machine? If not then there is not backup except for ICloud? which if I were to mess up or it were to mess up, I could not restore that data.

    Thoughts?

  16. Ted Avatar
    Ted

    Three Great Bows to you! Your step by step instructions worked perfect. It was spooky to watch my restored calendars from time-machine disappear one by one right before my eyes.

  17. ttjerk Avatar
    ttjerk

    I updated to lion a few days ago (after a time machine backup). Then I moved mobileme to icloud. On the internet all data like calendars and addresses are the same as on my macbook pro. But I had to turn of the mobileme calendar in ical.
    For some reason my address book on the iphone stopped syncing with mobileme about half a year ago. So I had 820 addresses on my Macbook and only 250 on my iphone.
    I hoped that icloud should solve the problem but nothing happened. Then I found the button ‘Back up now’ in iCloud preferences on the iphone. I used it and it was really slowly. Next morning I found my agenda was gone. Even the buttons “+” and “calendars” were gone. So I restarted the iphone and after the restart all my calendars are there again and the same as on my MacBook, and my address book contains 1100 addresses. No overwriting but both address books are put together. I actually don’t dare to delete any doubles although it are not real doubles. Will see how it looks after a few days.

  18. ttjerk Avatar
    ttjerk

    I forgot : the Macbook has 1100 addresses too.

  19. Annette Avatar
    Annette

    Thankyou. I nearly died when all my appointments had disappeared from iPhone, iPad and laptop. I now know when all my appointments are. Will be printing a backup copy though if I can…just for peace of mind!

  20. RJ Avatar
    RJ

    Another issue I came across that worked for me was in my view settings. If you designated an event to be an all-day event, it may not show up unless you select show allay events.

    View>check show all day events

    This might bring some items back that were not showing up. It appeared that I lost several events, but in fact they were there, but the view setting was not selected.

  21. Sylvia Avatar
    Sylvia

    After switching to iCloud there were a few bumps and bruises, but for the most part was ok with it. Until this morning! when all my emails were gone! After panicking, and trying to google at the same time, I found your site. And while it wasn’t the same issue. The thinking behind it – go to the Preferences of what is being affected and look around – totally worked! I found some box that was untoggled, but it said ‘enable this (email) account”. I figured, what the hell, lets toggle it on and see what happens an well-la my emails came back to me. Ahhh and this stuff is suppose to make my life easier!?!? Thanks so much for the info!

  22. William Jacobs Avatar
    William Jacobs

    I never used MobileMe, but iCloud still seems to be removing my events from my iPhone. Although everything going back a few years is still on iCal, my phone now only has events going back a month, as well as recurring events. Even when I sync directly with my computer my phone does not have the old events it used to have. How can I restore these?

  23. Tomdelucy Avatar
    Tomdelucy

    All you have to do is go to your calender settings and under the sync option click show all events. This will then show all of your previous calender entries. They have not deleted them, it is just Ical being “efficient”

  24. Ansally Avatar
    Ansally

    Room34: This article helped me to recover years of lost calendar data. THANK YOU BIG TIME!!!

  25. Shannon S. Avatar
    Shannon S.

    Thank you so much! 

  26. New-kt Avatar
    New-kt

    Great for past events. But how can I stop phone from erasing any rvents from now on?
    Dear Apple, thus is a Stupid feature (deleting events) when people NEED to keep records and look things up. Really pathetic.

  27. New-kt Avatar
    New-kt

    Thanks but -Mine says Sync all events byt they are still gone.

  28. Aldert Avatar
    Aldert

    This can be done MUCH simpeler:

    turn iCloud calendars back on, this should put your data backright click each calendar and select exportthen when all have been exported, do an import on each of them and select a calendar in the on my mac section (gives option to create one during import if not there)Found on: http://forums.macrumors.com/showthread.php?t=1262106

  29. Aldert Avatar
    Aldert

    This can be done MUCH simpeler:* Turn iCloud calendars back on, this should put your data back* Right click each calendar and select export* Then when all have been exported, do an import on each of them and select a calendar in the on my mac section (gives option to create one during import if not there)Found on: http://forums.macrumors.com/showthread.php?t=1262106

  30. jog4joy Avatar
    jog4joy

    Good job. Saved my bacon. Worked fine for Calendar under OS X Mountain Lion. Thanks…

  31. jet Avatar
    jet

    I don’t use iCloud or MobileMe, but I was still having random events disappear from my calendars which seemed to occur when syncing my iPhone to my iMac. I too have a handful of separate calendars. It seems like for me it mostly affected recurring dates.
    Anyway, these instructions proved immensely helpful in recovering some of my dates that were missing, so thank you very much!