Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I just upgraded a MacBook Pro running Snow Leopard to Mountain Lion.

On Snow Leopard I was running iCal and had 10 years of history inside.

Now on Mountain Lion, this application was renamed Calendar, and I find all my 9 calendar names but they are empty.

I just get all the Birthdays and 2 subscribed calendars filled.

Looking at /var/log/system.log I found 2 hours of error messages like:

Sep  2 18:41:01 localhost mdworker[759]: UTF8 encoding failed for Ãloïse @ Juterbog
Sep  2 18:41:02 localhost mdworker[759]: Date validation error: EXDATE = ' 20020916T220000Z'
Sep  2 18:41:02 localhost mdworker[759]: Date validation error: EXDATE = ' 20021022T220000Z'
Sep  2 18:41:02 localhost mdworker[759]: Date validation error: EXDATE = ' 20020620T220000Z'
Sep  2 18:41:02 localhost mdworker[759]: Date validation error: EXDATE = ' 20010414T220000Z 20010415T220000Z'
Sep  2 18:41:02 localhost mdworker[759]: UTF8 encoding failed for vacances scolaires été
[...]
Sep  2 18:41:02 localhost mdworker[759]: Invalid char : (58) for mParamName in line 432
Sep  2 18:41:02 localhost mdworker[759]: Invalid char . (46) for mParamName in line 432
Sep  2 18:41:02 localhost mdworker[759]: Invalid char   (32) for mParamName in line 432
Sep  2 18:41:02 localhost mdworker[759]: *** WARNING Invalid component, discarding: Error Domain=com.apple.iCalendar Code=1000 "DTSTART is required for VEVENT." UserInfo=0x7fada22d24a0 {NSLocalizedDescription=DTSTART is required for VEVENT.}

These error messages look like they are clearly related with the migration failure of my calendars. Unfortunately no explanation no error message was displayed to explain how to fix this.

What is the way to recover all my iCal personnal calendars?

share|improve this question
add comment

2 Answers

On Mountain Lion the calendar files are stored in /Users/USERNAME/Library/Calendars/. If all is correct you will find a bunch of folders that end in .caldav or .calendar, that contain another folder named Events which contains the events in the form of .ics files.

share|improve this answer
    
I find the .calendar subdirectories, but within them the Events subdirectory is empty. Apparently the migration failed secretly. –  daniel Azuelos Sep 3 '13 at 21:49
    
No backups I assume? –  Bart Arondson Sep 3 '13 at 21:51
    
I have a backup of my total disk of just before migration. It is a Snow Leopard 10.6.8. –  daniel Azuelos Sep 3 '13 at 21:59
1  
Then nothing is lost. You can access the backup, copy the calendar folders including the .ics items and have your old events back. That's my assumption though, I have not tried this myself. –  Bart Arondson Sep 3 '13 at 22:12
1  
→ bart: thanks! I tried it. It worked! –  daniel Azuelos Sep 3 '13 at 23:23
add comment

Let's say my user name is bob and I have a backup disk named sequoia.

Here is one way to fix this misbehaviour of migration quickly. All this process went through Terminal commands.

  1. Quit Calendar

  2. Make a backup of the corrupted calendars (just in case something might go worse, even if I was at the worst I ever imagined):

    cd /Users/bob/Library/Calendars
    mkdir .bak
    mv *.calendar Calendar\ Cache .bak
    
  3. Copy the backuped calendars to replace the corrupted ones:

    cd /Volumes/sequoia/Users/bob/Library/Calendars
    cp -pR *.calendar ~/Library/Calendars
    
  4. Start Calendar and check that it does convert everything correctly (this took many minutes).

  5. If everything is OK, clean up the useless backup directory:

    cd /Users/bob/Library/Calendars
    rm -rf .bak
    
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.