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 “” (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 “” 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