Restore Shell configuration and packages

  1. To get the styling and some other things back simply extract Backups.backupd/$COMPUTERNAME/latest/$SYSTEMVOLUME/Users/$USER/Library/Preferences/com.apple.Terminal.plist from the backup and copy it to /Users/$USER/Library/Preferences/
  2. To get the shell config copy Backups.backupd/$COMPUTERNAME/latest/$SYSTEMVOLUME/Users/$USER/.bash_profile (and/or .profile/.bashrc) to /Users/$USER/. If you prefered another command interpreter (e.g. zsh) in the past, choose the respective files. Same with history files/folders like .bash_history and .bash_sessions.
  3. I don't advise to copy anything from Backups.backupd/$COMPUTERNAME/latest/$SYSTEMVOLUME/usr/local/bin to get your brew packages back. Instead check Backups.backupd/$COMPUTERNAME/latest/$SYSTEMVOLUME/usr/local/var/homebrew/linked and Backups.backupd/$COMPUTERNAME/latest/$SYSTEMVOLUME/usr/local/opt and install the listed packages one by one with brew. The keg-only dependencies will be installed automatically.

    Entering brew bundle dump in Terminal before formatting the drive and moving the result to a save place, would have helped to restore your old brew enviroment on your current system.

  4. Check Backups.backupd/$COMPUTERNAME/latest/$SYSTEMVOLUME/usr/local, .../bin and .../sbin for other binaries installed independently.

with

  • $COMPUTERNAME: the computer name before formatting
  • $SYSTEMVOLUME: the name of the system drive before formatting
  • $USER: your user name before formatting

Almost all files and folders are invisible because they start with a dot or they are flagged invisible. So either use the AppleShowAllFiles YES feature or a decent file browser (like Path Finder).