All the configuration is done into a file named .mackup.cfg
to store at the
root of your home folder.
To configure mackup, create a file named ´.mackup.cfg´ in your home directory.
vi ~/.mackup.cfg
You can specify the storage type Mackup will use to store your configuration
files.
For now you have 4 options: dropbox
, google_drive
, copy
and file_system
.
If none is specified, Mackup will try to use the default: dropbox
.
With the dropbox
storage engine, Mackup will automatically figure out your
Dropbox folder.
[storage]
engine = dropbox
If you choose the google_drive
storage engine instead, Mackup will figure out
where your Google Drive is and store your configuration files in it.
[storage]
engine = google_drive
[storage]
engine = icloud
If you choose the copy
storage engine, Mackup will figure out
where your Copy folder is and store your configuration files in it.
[storage]
engine = copy
If you want to specify another directory, you can use the file_system
engine
and Mackup won't try to detect any path for you: it will store your files where
you explicitely told him to, using the path
setting.
The path
can be absolute (from the /
of your drive) or relative to your
home directory.
The path
setting is mandatory when using the file_system
engine.
[storage]
engine = file_system
path = some/folder/in/your/home
# or path = /some/folder/in/your/root
You can customize the directory name in which Mackup stores your file. By
default, if not specified, Mackup creates a Mackup
directory in the storage
engine you chose, e.g. ~/Dropbox/Mackup
.
[storage]
directory = Mackup
For example:
[storage]
engine = file_system
path = dotfiles
directory = backup
This will store your files in the ~/dotfiles/backup
directory in your home.
You can also select a subfolder:
[storage]
engine = icloud
directory = .config/mackup
In your home folder, create a file named .mackup.cfg
and add the application
names to allow in the [applications_to_sync]
section, one by line.
# Example, to only sync SSH and Adium:
[applications_to_sync]
ssh
adium
A sample of this file is available in this folder. Just copy it in your home folder:
cp mackup/doc/.mackup.cfg ~/
In your home folder, create a file named .mackup.cfg
and add the application
names to ignore in the [applications_to_ignore]
section, one by line.
# Example, to not sync SSH and Adium:
[applications_to_ignore]
ssh
adium
A sample of this file is available in this folder. Just copy it in your home folder:
cp mackup/doc/.mackup.cfg ~/
Open a new issue and ask for it, or
fork Mackup and open a
Pull Request.
The stock application configs are in the mackup/applications
directory.
You can customize the Mackup engine and add support for unsupported applications or just custom files and directories you'd like to sync.
Let's say that you'd like to add support for Nethack (config file:
.nethackrc
) and for the bin
and .hidden
directories you keep in your
home.
In your home, create a .mackup
directory and add a config file for the
application you'd like to support.
mkdir ~/.mackup
touch ~/.mackup/nethack.cfg
touch ~/.mackup/my-files.cfg
Edit those files
$ cat ~/.mackup/nethack.cfg
[application]
name = Nethack
[configuration_files]
.nethackrc
$ cat ~/.mackup/my-files.cfg
[application]
name = My personal synced files and dirs
[configuration_files]
bin
.hidden
You can run mackup to see if they are listed
$ mackup list
Supported applications:
[...]
- my-files
- nethack
[...]
All good, you can now sync your newly configured files:
mackup backup
If you override an application config that is already supported by Mackup, your new config for this application will replace the one provided by Mackup.
You can find some sample config in this directory.