Recovery of files from Time Machine breaks due to permission problems

Originator:mgprot
Number:rdar://7682055 Date Originated:24-Feb-2010 12:36 AM
Status:Open Resolved:
Product:Mac OS X Product Version:10.6.2
Classification:Crash/Hang/Data Loss Reproducible:Always
 
Summary:

When recovering data from Time Machine, some directories fail due to permission restrictions.

Steps to Reproduce:

(Using the calendar as an example, however, I have seen this behaviour in other directories)

Create some calendar entries in iCal.
Backup ~/Library/Calendars via Time Machine.
Create some new calendar entries, delete others.
Quit iCal.
Recover the older version of ~/Library/Calendars from Time Machine.

Expected Results:

At first a pop-up should appear and ask if the existing ~/Library/Calendars directory should be replaced, copied or if the recovery should be cancelled.
In both recovery cases, (keep both and replace), the recovery should proceed and finish successfully.

Actual Results:

The expected pop-up appears.

Selecting "keep both" renames the existing directory, creates a new ~/Library/Calendars directory and the first calendar directory below that, before complaining about permission restrictions and aborting - result: an empty iCal.

Selecting "Replace" causes the contents of ~/Library/Calendars to be completely deleted before a new ~/Library/Calendars directory and the first calendar directory below it are created. Again, recovery is aborted due to permissions problems. Again, iCal is left empty - any data which may still have existed is gone. (This is also the reason I categorised this problem as "Crash/Hang/Data Loss")

Regression:

Notes:

I was able to work around this problem by using the shell to copy the files manually from Time Machine to ~/Library as follows:

% rm -rf ~/Library/Calendars
% cd /Volumes/Archive/Backups.backupdb/<machine>/<timestamp>/<volumename>/Users/<user>/Library
% cp -rp Calendars ~/Library/

This worked flawlessly, iCal shows all calendar events as expected!
So why did it fail using Time Machine?

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!