5

I've got an iMac as my main computer and just bought a MacBook for while I'm travelling or visiting clients. I'm using Dropbox to keep my files in sync. But I've thinking about taking a step further and keep everything in sync, including Application, users preferences (everything in /Library/Preferences, /Users/user/Library/Preferences, /Library/Application Support and /Users/user/Library/Application Support) as well as Applications and everything in the command line (including home-brew install, packages, etc.

Please note that I do know how to keep Applications and User Preferences in sync (ln -s /source/dir/ /Users/user/Dropbox/whatevername) but would like to know if its advisable to also sync Applications and command line settings/packages (which I have no idea of how to do it).

Could you please provide suggestions? Thanks in advance

0

There are a number of ways to achieve this and probably twice as many traps. That said, I've had a lot of success using Mackup. It can backup your dot files, plist files, is customizable and can integrate with several cloud storage services or a local file server. I run this hourly as a cron job to make sure I'm always backing up. This works well on settings but not apps. You can find this at https://github.com/lra/mackup

You could also use Homebrew as a way of "synching" your applications. brew list > souceAppList on your iMac will list the applications installedthere. You could do the same on your MacBook and grep the difference to see what is missing. Something like:

targetApps="$(brew list)" 
for checkThisApp in $(cat /some/path/to/sourceAppList); do
  if [[ "$checkThisApp" != "$(echo "$targetApps"|grep -o $checkThisApp)" ]]; then
    echo "$appCheck is not installed on this computer"  # to notify an app is missing
    brew install "$appCheck"                            # to force the app install
  fi
done

You must log in to answer this question.

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