3 minute read

Do you work on multiple PCs? Do you use a plethora of different tools that in turn use a bunch of configuration files to store their settings? Do you spend way too much time keeping those settings synced between multiple machines?

Well, you are not the first person to have this problem. Settings and dotfiles can be a hassle. If you search for ‘dotfile management’, you’ll probably find about a gazillion tools and approaches that try to make dealing with dotfiles easier.

What do I mean by dealing with them? Well, say you use vim and you have a heavily modified .vimrc. If you make some changes to it, and move to a different computer, those changes obviously won’t be there. Same goes if you move to an entirely new machine. You’ll have to recreate those changes by hand, and that’s a bit of a hassle.

I’ve been using a tool called Mackup to help in this regard for a couple of years now. Since I recently moved to a new PC, I decided to write about how I use Mackup to honor the occasion. I’ll outline how you can use it and highlight some things you should be aware of.

First up: If you are a Windows user, sorry, Mackup doesn’t work on Windows machines and never will. If you use Linux or MacOS start off by installing Mackup using your preferred method. I usually just go for:

pip install mackup

Next you’ll have to pick a place where Mackup will store your configuration files. This can be some folder on the Network, or your Dropbox folder, or some git repository. Mackup will default to using your Dropbox folder, so if you have that installed, that’s what it’s going to use. I myself use CloudStation Drive, so I have to tell Mackup to use the ~/CloudStation folder. You can do that by creating a file ~/.mackup.cfg with the following content:

[storage]
engine=file_system
path=CloudStation
directory = Synced/Mackup

[applications_to_ignore]
transmission
ssh

In order to sync your Dotfiles to your shared location run mackup backup. In order to restore them use mackup restore. As the readme so eloquently describes those two command will simply copy your files and create symlinks in their place. Mackup already supports a bunch of applications out of the box. You can have a look at the full list in the Readme.

The upside to using Mackup is that you never have to worry about keeping files in sync. If you make changes to some dotfile, for example your .bashrc those changes actually happen in your shared folder, and as soon as you move to another machine those changes are pulled down there. This means that recreating your settings on a new machine is reduced to installing Mackup and your Sync Application and running mackup restore.

There are also some downsides. The fact that you rely on some other service to actually do the syncing for you means you inherit that services flaws. When I used Dropbox, I used to get conflicted file copies fairly commonly, due to multiple machines syncing file changes at the same time. This was especially problematic when programs made changes to their files often, as is the case with IntellJ Idea (which is why I rely on the Settings Repository now.)

Another issue is that the application configurations for Mackup might not be exactly right for your installation. I used to have some problems with oh-my-zsh and vim in that regard. Luckily creating your own custom configuration is super easy.

There is always room for improvement, but Mackup certainly made keeping my configurations up to date easier.

Updated: