Wednesday 23 May 2012

Restoring lost iCal events and calendars

I ran into a problem today with iCal, and failed to find the information I needed on the Internet. After reading a few forum posts, learning one or two tips on the way, and using some common sense, I got my iCal calendars completely restored, and everything back to normal.

So I decided to write a quick little post, hoping it might help someone who faces the same situation.


The problem

What happened was this: after turning on iCloud sync for my calendars, I suddenly lost all my iCal events. It seems that iCal, for some unknown reason, reverted to an ancient version of my calendars. All the daily events I had carefully entered (including various recurring alarms, to remind me when to pick up my three children from school - they have different school hours) had been lost. Why? I haven’t a clue; but I knew what I wanted done: restore my iCal to the state it was in a couple of days ago.

The difficulty

The solution seemed very simple. Since I’m running Mac OS X Lion, all I should need would be to fire up Time Machine and restore my calendars, right?

Wrong. When I opened Time Machine, I couldn’t find my calendars. After all, where are they stored? And how could I restore them?

I eventually discovered that what I needed was hidden from me by default (Mac OS X trying to be helpful!), but it wasn’t too hard to find.

The solution

So here’s an easy-to-follow step-by-step guide to getting iCal back to the state it was in at some time in the past (assuming, of course, that you have been using Time Machine!).
  1. Quit iCal (just to be on the safe side).
  2. Navigate to the “Library” folder inside your home folder. This folder is hidden by default, so if you can’t find it, select the “Go” menu in the Finder, then choose the “Go to Folder ...”. In the dialog box that will appear, type in: ~yourusername/Library (where “yourusername” should be substituted for your user name, of course).
  3. Once in your “Library” folder, delete all the contents of the “Calendars” folder.
  4. Still in your “Library” folder, scroll down until you find the folder called “Preferences”.
  5. Inside this folder, delete all the files that begin with “com.apple.iCal” (there should be a few of these files).
  6. Now we’re ready to restore! Making sure you’re still in the “Preferences” folder inside your “Library” folder, enter Time Machine. [You can enter Time Machine without leaving the “Preferences” folder using one of the following options: (1) through the Time Machine menu-bar icon, or (2) using Spotlight (hit “command” + “space-bar” to bring up Spotlight's search box, and search for Time Machine).]
  7. Go back to the date you wish to grab your iCal data from (in my case, I went back a week in Time Machine).
  8. Select all the files that begin with “com.apple.iCal” in the “Preferences” folder, and click “Restore”.
  9. Enter Time Machine again, and again go back to the date you wish to grab your iCal data from, as in step 7 (thanks, Steafán!).
  10. Navigate up one level (to your “Library” folder).
  11. Find the folder named “Calendars”, and click “Restore”.
And that’s it. Open up iCal, and everything should be back to normal.

If you need any extra help, let me know in the comments below. Cheers.

P.S. One of the readers of this blog (Simon Ramskill) made a very pertinent addition, which I include below (thanks, Simon!):

“For those that have Icloud turned on - turn off your modem while you go through the whole process. Once you have restored your calendars, export each one to your desktop and then turn your modem back on. Icloud will delete the calendars (its always the master) and then you can reimport them from your desktop - they will then resync with iCloud and your done!”


© Ben Ulster

38 comments:

  1. Thanks, helped out. Similar problem. I did by accessing the calendar folder on time machine and just pressing restore, without the deleting of files you went through.

    ReplyDelete
  2. Great. Me, I'm paranoid, so I preferred to delete and then restore (just to be sure there was no mixing of data and preferences).

    Cheers.

    ReplyDelete
  3. Martha Anderson7 August 2012 at 09:14

    Thanks! That was a great solution. I have trolled the internet for hours, even days, looking for help, and tried a few really messy fixes, but yours worked like a charm. You are brilliant!

    ReplyDelete
  4. Martha, thanks for the compliment, and it's lovely to know I was able to help a little; you've made my day :-)

    Cheers.

    ReplyDelete
  5. Ben, thank you sooo much! I opened my iCal today and found it totally blank. I googled for a long time and nothing worked until I found your site. It didn't work the first time because I messed up, but I went thru your steps (carefully) again, and when I opened iCal... YAY!!! EVERYTHING WAS THERE!!! You're a life saver. Thank you, and God bless you for sharing and helping others!

    ReplyDelete
  6. RT, thanks for stopping by. I'm glad I was able to help, and thank you for letting me know. Cheers, and God bless.

    ReplyDelete
  7. You are a lifesaver. Thank you!

    ReplyDelete
  8. Cheers, Bryce. hanks for the encouraging comment.

    ReplyDelete
  9. Well done Ben and thank you — that worked seamlessly. Why doesn't Apple follow your lead?

    ReplyDelete
  10. fotoLibrarian, thanks for leaving note, and glad I was able to help. Cheers.

    ReplyDelete
  11. You're awesome- so simple Thanks.

    ReplyDelete
  12. Hi, Anonymous, glad to be of some help. Cheers.

    ReplyDelete
  13. THANK YOU THANK YOU THANK YOU!!!

    I tried everything on the apple.support and it didn't work.

    Although...once the calendars were up there the cloud deleted everything, so I had to add a step and stay offline until I could backup the calendar and import/export it.

    ReplyDelete
  14. Jen, glad to have been of help. The extra step you had to take is an added difficulty I didn't encounter (probably due to the intermittent Internet connection I have here in Brazil :-)

    Anyway, cheers.

    ReplyDelete
  15. You helped me tremendously! After having dutifully added all my work and course assignments, I got the bright idea to sync with iCloud. It wiped everything. And, Apple support communities were not as forthcoming with information as I would have liked. Now, following your steps, I not only restored my beautiful calendars but I also got a better idea of how to navigate around in TM. Thank you so much!

    ReplyDelete
  16. As always, glad to have been of help. Cheers!

    ReplyDelete
  17. unbelievable!!!! thanks a lot. I restored my iCal, so now I know what to do the next months.... :-)

    ReplyDelete
  18. Koen, glad to have been of help. Cheers.

    ReplyDelete
  19. This works a treat, thanks. However iCloud simply deletes it all again. How do I stop this happening, so that my iPhone can pick up the restored calendar?

    ReplyDelete
    Replies
    1. Jon, as far as I know, this is a bug in iCal. You can restore calendars that were deleted, but I don't know of any way that you can prevent iCal from deleting them in the first place. If I find out anything else, I'll post it here.

      Cheers.

      Delete
    2. Jon, if you're still looking for an answer to your question, check out Simon's comment posted today (3rd April 2013). Cheers.

      Delete
  20. i have tried your steps several times, to no avail. i guess i'm confused about the step where once inside preferences, inside library, i'm supposed to enter time machine. i don't know how to enter time machine unless i navigate outside of preferences (therefore away from home and into applications) and then i don't see what happens next. thanks in advance.

    ReplyDelete
  21. Hansen, you must enter Time Machine through it's menu bar icon (If you can't see Time Machine's icon on the right hand side of your menu bar, open System Preferences, choose Time Machine, and enable the check box beside "Show Time Machine in menu bar").

    Hope that solves your problem. If not, drop me a note here, and we'll try and work something out.

    Cheers.

    ReplyDelete
  22. I’m so happy to read this. This is the kind of manual that needs to be given and not the random misinformation that’s at the other blogs. Appreciate your sharing this great post.

    ReplyDelete
  23. Benjamin,
    Thanks so much for this fix! I wish the Geniuses at Apples store would use this as a reference. I couldn't find anything else that was useful - and it was easy to do.
    Best regards,
    Michael g.

    ReplyDelete
    Replies
    1. Michael, thanks for your positive feed-back. Cheers.

      Delete
  24. Hi thanks so much for posting this. For those that have Icloud turned on - turn off your modem while you go through the whole process. Once you have restored your calendars , export each one to your desktop and then turn your modem back on. Icloud will delete the calendars (its always the master) and then you can reimport them from your desktop - they will then resync with iCloud and your done!

    ReplyDelete
    Replies
    1. Simon, thanks for your tip; it's the answer to Jon's question (24th of Feb). Cheers.

      Delete
  25. Thank you! After wasted time on the Apple site, your instructions were the solution. Definitely not an intuitive task...

    ReplyDelete
    Replies
    1. Anonymous, glad to have been of help! Cheers.

      Delete
  26. OMG, it didn't work for me.. EVERYTHING disappeared! PLEASE HELP

    ReplyDelete
    Replies
    1. Don't panic :-)

      Just follow the steps outlined above, beginning with step 6, and make sure you're restoring from a valid Time Machine backup.

      Cheers, and good-luck.

      Delete
  27. thanks so much. I really don't understand why this happened. I added a load of events, popped out for 30 minutes and when I returned they'd disappeared but this fixed it! I can't thank you enough!

    ReplyDelete
  28. Julie Bavington28 July 2021 at 13:19

    2021 and this is super useful info. Unfortunately, I had not been using the Time Machine Feature in the past. But it will be set up from here on out. Thankfully, my calendar events were backed up to my phone calendar. Thanks for the info on how to clear out the ical. Super helpful.

    ReplyDelete