Sync macos settings using mackup [closed]
Asked Answered
G

2

8

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

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

Galyak answered 22/2, 2020 at 16:54 Comment(0)
C
1

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 :)

Collins answered 4/3, 2020 at 21:3 Comment(0)
B
0

Dropbox is the default engine:

        if self._parser.has_option("storage", "engine"):
            engine = str(self._parser.get("storage", "engine"))
        else:
            engine = ENGINE_DROPBOX

it's really hard to say definitively, but by the looks of it, your target machine cannot find/parse the config file. Therefore at this stage I'd say it doesn't even matter whether you have checked out your git repository on the target machine (which I'm assuming you did anyway)

  1. I'd suggest checking whether your config is in your user folder: ~/.mackup.cfg,
  2. and retrying mackup -v restore - this might hint at an issue with your specific environment

I'm hoping this points you in the right direction

Bittencourt answered 28/2, 2020 at 8:53 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.