Published: October 30, 2018
Updated: January 07, 2023
Tags: macOS, Backup
2 min read

Backing up and syncing macOS environment

In this blog post, I'll be describing my workflow [1] and how I sync settings between multiple macOS machines.

Why syncing/backing up?

It seems like an obvious question with an obvious answer, but for each individual, there is a different reason.

To me personally, syncing/backing up is used for continuity.

A piece of text I copied, a setting I changed, or a link I saved must continue to exist and be present regardless of which machine I work on.

macOS and application data

One of the "advantages" of macOS applications is that they're self-contained and are not dependent on external configuration files (like registry in Windows, etc.). This is leveraged in a few different ways.

Self-synced application

There are applications like Paste [2], Canary Mail [3] which sync all their data via iCloud naively, which then can be quickly restored/synced through their settings interface.

Web browsers like Firefox [4] offer an account/self-hosted server that syncs all the data.

Syncing via external tools

Since applications store their data in self-contained, there are tools to sync configuration files between machines.

How do I achieve continuity

If the application doesn't support native sync, I use git for configuration files (personal preference) and Mackup for application data.

Git

Git [5] doesn't need an introduction, and it’s one of the most popular version control software.

I keep my dotfiles in a [6] repo (mentioned above).

Dotfiles are part of my git flow because I want to keep track of the changes, and I don't want them to be synced immediately (unlike application configuration).

Mackup

Mackup [7] is an open-source python utility that is meant to keep your macOS and Linux applications in sync.

Mackup does this by copying the application configuration files to a shared drive (or a path) and symbolically linking to it.

Installing and configuring mackup

Mackup is a python utility, which can be installed via pip [8], homebrew [9] or directly from the git repo.

After installing Mackup, create a configuration file in your user's home directory, 'touch ~/.mackup.cfg'.

Configure your preferred support storage method [10].

Edit the Mackup configuration file with your selected storage method and include which applications you want to sync (the complete list can be viewed by running 'mackup list'):

vi ~/.mackup.cfg
[storage]
engine = icloud # Enter your preferred method
[applications_to_sync] # Enter supported applications that you want to sync
bettertouchtool
iterm2
vscode-insiders
tunnelblick
git
itsycal

Afterward, run mackup backup (try saying it quickly five times) to backup files to selected storage (verbose is shown by adding -v flag).

On other machines, download Macckup, copy the configuration file, and run mackup restore to create symbolic links from shared storage to the local machine.

To remove symbolic links, you can run mackup uninstall.

Adapting applications to be supported by Mackup can be quickly done by following Mackup's documentation [11].

Conclusion

Most macOS applications excel at backing up your configuration, and there are ways to fill the gaps for those who don't.


  1. Personal workflow Github repo ↩︎

  2. Paste's homepage ↩︎

  3. Canary Mail's website ↩︎

  4. Firefox's homepage ↩︎

  5. Git's homepage ↩︎

  6. GitHub's homepage ↩︎

  7. Mackup GitHub repo ↩︎

  8. pip's PyPi page ↩︎

  9. homebrew's homepage ↩︎

  10. Mackups' supported storage ↩︎

  11. mackup's custom application backups documentation ↩︎