Sync macos settings using mackup

beth :

I use two Mac, one for work and the other one it's my personal macos.

I would like to sync settings between the two machines.

I found this application that seems to do what I want: https://github.com/lra/mackup/.

I want to save my settings on GitHub so I set my .mackup.cfg file in this way:

[storage]
engine = file_system
path = dotfiles
directory = backup

# List of applications you want to explicitly sync (one application name per line).
# To see a list of supported application names, launch `mackup list`.
# If this list is empty, Mackup will try to sync all the supported applications.
[applications_to_sync]
bash
bash-it
docker
eslint
gimp
git
iterm2
libreoffice
mackup
matlab
npm
oh-my-zsh
spotify
sublime-text-3
ssh
vscode
zsh

# List of applications you want to ignore (one application name per line).
# If an application is ignored, it will be ignored even if it's been explicitly allowed in the [Allowed Applications].
[applications_to_ignore]

So in my home folder I have a dotfiles folder with this structure:

dotfiles
  |_ backup
       |_ .docker
       |_ .oh-my-zsh
       |_ ...

Then I save this folder on my GitHub account adding a README. So The final structure is this:

dotfiles
  |_ backup
       |_ .docker
       |_ .oh-my-zsh
       |_ ...
  |_ README.md
  |_ .git

Now, how can I set these preferences on my new machine? I install mackup then I should do mackup restore but I get this error:

Error: Unable to find you Dropbox install =(

I didn't find anything that can help me on the documentation.

Thanks a lot

daco :

As @timur said, Dropbox is the default storage for mackup.

What you need to do is to configure a custom file_system engine in your ~/.mackup.cfg(this is in your home directory)

As per mackup Readme you need to add the following to your ~/.mackup.cfg

[storage]
engine = file_system
path = some/folder/in/your/home

which is what I see you did in your first machine.

What I think is still missing is the same config in the second machine.

I would do the following:

On your first machine
1. Create a git repository in ~/dotfiles
2. Add your ~/.mackup.cfg
3. run mackup backup
4. Add, commit and push new files and changes

Second machine
5. Add the same ~/.mackup.cfg in the second machine
6. clone your dotfiles repository in your second machine in ~/dotfiles
7. run mackup restore

Each time you make changes in either machine, just commit the changes and pull the updates in the other machine.

If you want you may also have a branch for each machine and the merge the final changes into a master or develop branch.

That should do the work :)

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=29536&siteId=1