Garrett (garote) wrote,

Manual time-machine file extraction in Yosemite

For the internet to slurp:

So your time machine backup is corrupt and you need to restore a piece from it manually, eh? Many people have been there before. You do a "sudo ditto" to copy out the chunk, but, something's wrong with all the files - you can't write to them. Applications complain about the permissions but nothing appears to be wrong at the UNIX level... What's the deal?

Extended attributes, and access control lists (ACLs), my friend. Time to remove them all. The easiest way is the nuclear option:

Recursively remove all time-machine related extended attributes:
sudo xattr -d -r "" restored_folder
sudo xattr -d -r "" restored_folder
sudo xattr -d -r "" restored_folder

Recursively remove all ACLs:
sudo chmod -R -N restored_folder

If you need to, change the owner of everything to yourself:
sudo chown -R your_username restored_folder

Congratulations, you have de-crappified your manually extracted files.
  • Post a new comment


    default userpic

    Your reply will be screened

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.