by

This weekend I was accidentally deleted an iCloud Calendar. And of course, thanks to Apple’s quick sync the Calendar disappeared from all my devices in no-time :(

Here’s how I managed to restore the Calendar:

  1. In Finder, hold the ⌥ option key to go to the otherwise hidden Library folder under the Go menu.
  2. Navigate to Calendars.
  3. Find out which *.caldav folders is of your iCloud Account by checking their Info.plist.
  4. In that folder, take note of all remaining *.calendar folders.
  5. Enter Time Machine.
  6. Browse back in time until you see a new *.calendar folder appear.
  7. Restore the folder to a temporary folder like your Desktop.
  8. Use this NodeJS script to prepare the *.ics files. It generates a new UID and removes X-* tags so that iCloud will treat them as new events. If you don’t, the events will import at first, but then automatically get deleted again after some time.

  9. Open Calendar and create a new iCloud or local Calendar.

  10. Select all *.ics files and drag them on the new Calendar in the sidebar. Don’t drop them on the Dock item – it will open a dialog for each event.

You’re welcome.