8 Replies Latest reply: Apr 3, 2013 12:47 PM by Linc Davis
Neil2 Level 1 (0 points)

I had a kernal panic (due to faulty ram) that caused damage to my hard drive that Disk Utility couldn't repair. I have to restore from my Time Machine backup. 


It lets me start to restore, but when I get about 1% of the way done, I get the message ""an error occurred while restoring from the backup," and then I have to restart the iMac and try to restore again, but the same thing happens.  I have tried older backups with the same result.  I also have a second TM drive, but for some reason TM wont even see it.  That is a seperate problem. 


Anyway, it looks like I have a corrupt file somewhere that prevents the TM restore.  I don't know how to restore one folder at a time. 


iMac (27-inch Mid 2010), Mac OS X (10.7.4)
  • Neil2 Level 1 (0 points)

    I did some research in these forums and found a post on this issue.  One step involves creating a root user and another step involves pasting the following into terminal:


    <pre style="overflow:auto; font-family: 'Monaco'; font-size: 10px">chown -R username:staff /Users/username</pre>


    I would like to understand the purpose of these steps before I proceed.  Does anybody here understand it? I would try to contact the author to ask him too, but he hasn't posted anything in years and there doesn't seem to be a way to message him anyway.  The complete post is below:



    Scott Radloff

    Re: "an error occurred while restoring from the backup."

    Feb 19, 2009 3:22 PM (in response to Track400md)



    No, the fact that the drive is partitioned is irrelevant. Without doubt, some files have been corrupted by a disk error. Evidently, that error has since been repaired automatically (this usually happens at boot time), but the damaged files will remain damaged.


    So now, your task will be to copy the files that can be copied, while working around whatever files are damaged. In the process, you'll end up identifying the problematic file or files. We'll use Time Machine to do this (not the Migration Assistant), and we'll need to do it from the "root" account. Here are the instructions that I give for using Time Machine to "restore" just a single user account to a new installation:


    First, enable the "root" account, then log in as root. While logged into the root account...


    1) Create an account using the exact same username and short name as an account you would like to restore from the backup. Once the account has been created, look in the "Users" folder, and move the new HOME folder into the trash.


    2) Connect the Time Machine backup drive, then open Time Machine from its Dock icon by Control-Clicking on the icon and choosing the "Browse Another Time Machine Disk..." Find your backup, then navigate one step "back in time" and locate the HOME folder you would like to restore. NOTE: This HOME folder should have the exact same name as the one you moved to the trash.


    3) Restore this HOME folder to your "Users" folder.


    4) When the restoration is complete, exit Time Machine. Open/Applications/Utilities/Terminal. At the prompt, type the following:


    <pre style="overflow:auto; font-family: 'Monaco'; font-size: 10px">chown -R username:staff /Users/username</pre>


    In the command above, you will replace all instances of "username" with the short name for the restored account. If the short name is "fred," for example, you will type the following exactly:


    <pre style="overflow:auto; font-family: 'Monaco'; font-size: 10px">chown -R Neil:staff /Users/Neil</pre>


    Verify that the command is correct, then press <RETURN>. When you return to the prompt, quit Terminal. Log into the restorred account to test it. If everything works as expected, log back into the root account, empty the trash, then log out of and disable the root account.


    For you, however, I'm going to recommend that you trash and replace only the contentsof the HOME folder in question, and one folder at a time (only the "Movies" folder, then the "Documents" folder, etc., etc.). At some point, you'll encounter the same error, but this error will be narrowed down to a single folder.


    Skip the troublesome folder, and continue with the other folders in the HOME folder. When everything else has been successfully restored, go back to the troublesome folder and focus on it. Return the one in the trash to its place, then open it. Trash items insidethis folder, one at a time, and attempt to restore same from the Time Machine backup. Continue with this process until you have identified the nested item or folder that is causing the problem.


    Rinse and repeat as necessary. At some point, you will have identified the file or files that are corrupt, and can skip them. Everything else will have been restored. It is likely that the troublesome files are inconsequential; perhaps a cache file. When you reach this point, run the "chown" command in Terminal as detailed above, then log into the account to test it. Don't forget to disable the root account when done.



  • Linc Davis Level 10 (184,680 points)

    Instead of doing a full-system restore, erase the volume, then install OS X. When you reboot, you'll be prompted to transfer your data from a Time Machine backup. Do that.

  • Neil2 Level 1 (0 points)

    Thanks for the suggestion. Will that allow me restore one folder/file at a time so I can track down the culprit? Will it also allow me to restore my user library?

  • Neil2 Level 1 (0 points)

    Thanks for the links, Eric. I came across those while researching this issue.  There was nothing there about my problem.

  • Linc Davis Level 10 (184,680 points)

    You can choose to restore any or all of user data, settings, applications, and "other files," which means everything else except system files. I suggest you try to restore everything and see what happens. You won't be restoring system files because you'll already have replaced those.

  • Neil2 Level 1 (0 points)

    I re-installed the os a couple days ago.  I was prompted to enter my iCloud ID, but I don't remember any prompt to transfer data from TimeMachine.  Where can I find that?

  • Linc Davis Level 10 (184,680 points)

    You didn't erase the volume first.