I just formatted my Mac. I have a backup of my latest status before the format, and I want only one thing from this backup. I want my terminal to be exactly as it was. Mainly I want to have all the commands running (e.g. brew, nom, l (instead of ls), ...). furthermore, I want all the themings and terminal styling.

Is there a way to do it not by using migration assistance?

  • Well, you could store those modifications literally anywhere on the filesystem. Perhaps do you know where you placed things to customize your mac? We could guess you used bash and the default locations where the bash man page says to store profile, rc, files. Same for brew. This is likely too broad if you want someone to review everything you might have done.
    – bmike
    Oct 19, 2019 at 1:40

1 Answer 1

  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.


  • $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).

  • This is fabulous advice. I would say, maybe think about checking your dot files into github or another code control repository if you like the idea of having a pristine new OS install and getting your text files and settings wired. I’m also a big proponent of just writing down what you miss and making it happen. Why carry all that crud forward? But again - super helpful and detailed answer to a hard to answer question
    – bmike
    Oct 19, 2019 at 1:42
  • @klanomath Thank you so much for the detailed answer, Just had the chance to go through it and it worked! :thumbsup:
    – iShaalan
    Nov 1, 2019 at 15:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .