Rescue Data via Recovery Mode in macOS

I recently had to help a friend of mine rescuing some data from her MacBook’s hard drive. Upgrading macOS from Yosemite to Sierra failed and her last TimeMachine backup was a month ago – still better than mine a year ago…

Here’s what we’ve done to save her data from MacBook’s internal to an external hard drive via recovery mode.

  • Start macOS’ recovery mode by holding down ALT key while powering on
  • Select Recovery Mode and confirm with Enter
  • In Recovery Mode select Utilities > Terminal from menu bar on top
  • Basic Terminal commands
    • cd "/Volumes/MacBook HD/Users/username/" change to your user directory (replace username by your username of course)
    • ls -l list files in current directory (-l switch shows more details)
    • cp -rv "/Volumes/MacBook HD/Users/username/" "/Volumes/External/Backup" copy data from first directory to second one (-rv means recursive for directories and verbose for showing detailed information while copying)
  • Connecting external hard drive
    • Run cd /Volumes && ls -l
    • Plug in your external hard drive
    • Run cd /Volumes && ls -l again and find out which entry has just shown up, let’s say External. This one’s your external hard drive
  • Copying all files from internal to external hard drive
    • Execute cp -rv "/Volumes/MacBook HD/Users/username/" "/Volumes/External/Backup"
  • Copying just some files from internal to external hard drive
    • Use cd "/Volumes/MacBook HD/Users/username/" && ls -l to list files in your user directory
    • Execute cp -rv "/Volumes/MacBook HD/Users/username/somedirectory" "/Volumes/External/Backup/somedirectory" for each directory or file you want to copy
  • Once all your data is saved unplug external hard drive and restore last backup as usual