We are committed to provide service 24 X 7

Deals, Shopping, Training, Tools

Learn how to – Backup your Application Settings on macOS|Linux using mackup

Learn how to – Backup your Application Settings on macOS|Linux using mackup.

How would you feel if you would configure your new laptop with a few commands and you get an exact copy of settings that you had in your previous computer? The hassle of setting up your computer every time you have a new one can immediately turn into a pain especially if your have several files to edit. A solution called Mackup is here to alleviate most of the burden and pain that this thorn on your flesh elicits.

In this exciting guide, we are going to uncover the veil, scrutinise Mackup, check its internal features, find out what it does and how it does it.

What does Mackup do?

Mackup does the following for you in a remarkable, elegant fashion:

  • Mackup does a very essential task. It takes the settings in your applications and back them up your in a safe directory (for example Dropbox, Google Drive or iCloud)
  • Mackup not only backs up the application settings but also syncs them among all your workstations
  • Moreover, Mackup restores your configuration on any fresh install in one command line: By only tracking pure configuration files, it keeps the crap out of your freshly new installed workstation (no cache, temporary and locally specific files are transferred).

With Mackup, the settings of popular applications can be restored. Examples of such applications you use everyday include: Fish, Ansible, AppCleaner, AppCode, Apple Music, Apptivate, AraraBash, Zsh, Adobe Photoshop, Git, Chef, Docker, Emacs, Fish, Heroku, i3 for you guys, JSHint, Libre Office, Mac OS X, MATLAB, MySQL, Microsoft Asure CLI, NPM and many more.

As you can already observe, this application Mackup makes setting up your environment quite easy and simple. In return, no more night spent configuring your applications. With this, you will save plenty of time for your family, great ideas, and all the cool stuff you like.

How does Mackup do this?

Next, the big question that will linger in our heads is how exactly Mackup is able to do this. Another concern may be what Mackup does to our files. We will attempt to answer some of these questions and concerns here.

First, the operating systems on the source and destination must be the same. There is no way you will backup Windows application settings and expect it to restore the same in a Linux box. Secondly, using Git and Dropbox as an example, the following is what takes place when you launch markup backup. Git settings are usually kept in your home directory in the .gitconfig file.

Backup

If you have Dropbox, these things happen when you launch mackup backup:

cp ~/.gitconfig ~/Dropbox/Mackup/.gitconfig
rm ~/.gitconfig
ln -s ~/Dropbox/Mackup/.gitconfig ~/.gitconfig

Now your git config is always backed up and up to date on all your workstations.

When Restoring

When you launch mackup restore, here is what happens behind the veil:

ln -s ~/Dropbox/Mackup/.gitconfig ~/.gitconfig

The git Configuration file now points to the restored file as a symbolic link and your settings will be back as they were when you backed up the previous system. With that, you end up saving a whole lot of time and your favourite settings appear like magic. Mackup does the same for any supported application.

Installation of Mackup on Linux | macOS

Now that we are confident that mackup is safe and convenient, let us go ahead and employ it to serve our needs so that we can focus on other important things while our application settings are backed up.

InstallMackup tool on macOS

To get mackup installed on your Mac, follow the following instructions.

We can install mackup using homebrew. Open up your terminal and run the command below

brew install mackup

Give it some time to download and setup mackup files in your OSX system

When the installation is done, simply run the command below to confirm that it was successfully installed

$ mackup --version
Mackup 0.8.33

In case you would like the very latest installed from the master branch instead of waiting on homebrew package version, you can run the command below in your macOS terminal

brew install --HEAD

Then check the version installed

mackup -h

In case you have an older version of mackup and you would like to upgrade it in your Mac, simply run the commands below:

brew update
brew upgrade
mackup —version

Install on Linux as well as macOS using pip

This method of installation depends on Python and pip. These must be installed before running the commands that follow

With Python’s PIP

#Pip2
sudo pip install mackup

#Pip3
sudo pip3 install mackup

And now you can confirm the version installed using the now familiar command

mackup —version

Upgrade mackup with Python’s PIP

We can also use pip to upgrade over versions of mackup. Simply run the command below then check the installed version

pip install --upgrade mackup
mockup —version

Configuration of mackup for backups

All the configuration is done in a file named .mackup.cfg stored at the root of your home folder.

To configure Mackup, create a file named .mackup.cfg in your home directory.

$ vim ~/.mackup.cfg

Storage

Mackuo uses the concept of storage to store the backup of your application settings. The storage options include: dropbox, google_drive, icloud, copy and file_system. Note that you must have respective client applications for the various storage engines installed on your computer before you can use them. You can specify the storage type Mackup will use to store your configuration files in the configuration file we created above. The default storage engine that will be used in case none is specified is Dropbox. Let us now find out how we can configure the various storage engines. This should be done on the source and destination computers.

1. Dropbox

You can configure Dropbox as your storage engine as follows in the .mackup.cfg in your home directory. Mackup will figure out where your Dropbox directory is and store your configuration files in it.

$ vim ~/.mackup.cfg
[storage]
engine = dropbox

2. Google Drive

If you choose the google_drive storage engine instead, Mackup will figure out where your Google Drive directory is and store your configuration files in it. Open up the .mackup.cfg in your home directory and set the following Configuration.

$ vim ~/.mackup.cfg
[storage]
engine = file_system
path = Google Drive/My Drive

You can download Google Drive from their Downloads Page. Install it and sign in to your google account when prompted. Then grant requisite permissions when prompted as shared below.

3. iCloud

Just like Dropbox and Google Drive, you can configure iCloud as your storage engine as follows in the .mackup.cfg in your home directory. Mackup will figure out where your iCloud folder is and store your configuration files in it.

$ vim ~/.mackup.cfg
[storage]
engine = icloud

4. Copy

If you choose the copy storage engine, Mackup will figure out where your Copy folder is and store your configuration files in it. Open up the .mackup.cfg in your home directory and set the following Configuration.

$ vim ~/.mackup.cfg
[storage]
engine = copy

How to use Mackup

Once you have installed mackup and configured your storage backend of choice, you can use the following commands to get started

Backing up your application settings can be done by the following command. First time running of the command will ask you to acknowledge the creation of a directory called “Mackup” in your local sync directory that your application settings will be stored in and synced to your storage engine. Simply type in “Yes”.

$ mackup backup
Mackup needs a directory to store your configuration files
Do you want to create it now? </Users/johnkibet/Google Drive/My Drive/Mackup> <Yes|No> Yes

Restoring your application settings on a newly installed workstation. On the new system, install the respective client application that will “talk” to your storage engines of choice, install mackup then run the command below.

$ mackup restore
# Sample output

Restoring .zshrc ...
You already have a file named .zshrc in your home.
Do you want to replace it with your backup ? <Yes|No>Yes

Copy back any synced config file to its original place. This will remove the symlinks and copy back the files from the Mackup folder in Dropbox to their original places in your home.

mackup uninstall

Display the list of applications supported by Mackup. You will see an output similar to the truncated list shared.

$ mackup list
Supported applications:
 - 1password-4
 - 2do
 - ack
 - adium
 - adobe-camera-raw
 - aerc
 - affinity-designer
 - affinity-photo
 - affinity-publisher
 - airmail
 - akamai-cli

You can also view the configuration files of a particular application as demonstrated below using zsh

$ mackup show zsh
Name: Zsh
Configuration files:
 - .zlogout
 - .zshenv
 - .zprofile
 - .zshrc
 - .zlogin

Get some help.

$ mackup -h

# You will see
Mackup.

Keep your application settings in sync.
Copyright (C) 2013-2021 Laurent Raufaste <http://glop.org/>

Usage:
  mackup list
  mackup [options] backup
  mackup [options] restore
  mackup show <application>
  mackup [options] uninstall
  mackup (-h | --help)
  mackup --version

Personalizing your mackup backup

With mackup, you can choose to limit the applications that you would wish to backup and restore. This can be configured using the same configuration file that we created in your home directory. Let us therefore look at how we can customise our backups.

Open up your terminal and edit the .mackup.cfg file. Add the section “[applications_to_sync]” and below it, list the applications that you would wish to sync only. In this example, zsh, Adium and Akamai-cli are the only applications whose settings are going to be synced.

$ vim ~/.mackup.cfg
[applications_to_sync]
zsh
adium
akamai-cli

Nevertheless, you can choose to ignore a couple of applications that you can sync. Add another section beginning with “[applications_to_ignore]” as illustrated below.

$ vim ~/.mackup.cfg
[applications_to_ignore]

webstorm
wget
whatsapp
wireshark

Uninstalling Mackup Tool

When all is said and done and you would like to eject mackup from your giant house, then you can run the following commands.

Uninstall with Homebrew (OSX only)

$ brew uninstall mackup

Uninstall with Python’s PIP

#pip3
sudo pip3 uninstall mackup

#pip2
sudo pip uninstall mackup

References:

There is a tonne of other settings and that you can still do with mackup and the following references will help you

Concluding Remarks

Now that we have mackup installed, we can comfortably backup and sync our application settings to a remote location such as Google Drive, Dropbox, iCloud or even on a local filesystem. No more worries when we have a clean install of our beloved operating systems because we can revert out cool settings with a single command. We hope the guide was informative and we continue to celebrate your support and positive comments.

Other articles and guides that will serve you well include:

Cart

Your Cart is Empty

Back To Shop