{"id":110777,"date":"2021-12-17T11:51:05","date_gmt":"2021-12-17T08:51:05","guid":{"rendered":"https:\/\/computingforgeeks.com\/?p=110777"},"modified":"2022-01-11T23:42:45","modified_gmt":"2022-01-11T20:42:45","slug":"backup-your-application-settings-on-macos-linux-using-mackup","status":"publish","type":"post","link":"https:\/\/computingforgeeks.com\/backup-your-application-settings-on-macos-linux-using-mackup\/","title":{"rendered":"Backup your Application Settings on macOS|Linux using mackup"},"content":{"rendered":"\n<p>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.<\/p>\n\n\n\n<p>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.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">What does Mackup do?<\/h3>\n\n\n\n<p>Mackup does the following for you in a remarkable, elegant fashion:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>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)<\/li><li>Mackup not only backs up the application settings but also syncs them among all your workstations<\/li><li>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).<\/li><\/ul>\n\n\n\n<p>With Mackup, the settings of popular <a href=\"https:\/\/computingforgeeks.com\/install-and-use-winget-windows-package-manager-client\/\">applications<\/a> can be restored. Examples of such applications you use everyday include: Fish, Ansible, AppCleaner, AppCode, Apple Music, Apptivate, AraraBash, Zsh, Adobe Photoshop, Git, Chef, <a href=\"https:\/\/computingforgeeks.com\/how-to-install-docker-on-rhel-7-server-desktop\/\">Docker<\/a>, Emacs, Fish, Heroku, i3 for you guys, JSHint, Libre Office, Mac OS X, MATLAB, MySQL, Microsoft Asure CLI, NPM and many more.<\/p>\n\n\n\n<p>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.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">How does Mackup do this?<\/h3>\n\n\n\n<p>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.<\/p>\n\n\n\n<p>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 <a href=\"https:\/\/computingforgeeks.com\/install-dropbox-on-archmanjarogaruda-endeavouros\/\">Dropbox<\/a> 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 <em>.gitconfig<\/em> file.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Backup<\/h3>\n\n\n\n<p>If you have Dropbox, these things happen when you launch mackup backup:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cp ~\/.gitconfig ~\/Dropbox\/Mackup\/.gitconfig\nrm ~\/.gitconfig\nln -s ~\/Dropbox\/Mackup\/.gitconfig ~\/.gitconfig<\/code><\/pre>\n\n\n\n<p>Now your git config is always backed up and up to date on all your workstations.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">When Restoring<\/h3>\n\n\n\n<p>When you launch mackup restore, here is what happens behind the veil:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ln -s ~\/Dropbox\/Mackup\/.gitconfig ~\/.gitconfig<\/code><\/pre>\n\n\n\n<p>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.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Installation of Mackup on Linux | macOS<\/h2>\n\n\n\n<p>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.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Install <meta charset=\"utf-8\">Mackup tool on macOS<\/h3>\n\n\n\n<p>To get mackup installed on your Mac, follow the following instructions.<\/p>\n\n\n\n<p>We can install mackup using homebrew. Open up your terminal and run the command below<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>brew install mackup<\/code><\/pre>\n\n\n\n<p>Give it some time to download and setup mackup files in your OSX system<\/p>\n\n\n\n<p>When the installation is done, simply run the command below to confirm that it was successfully installed<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ <span class=\"has-inline-color has-luminous-vivid-amber-color\">mackup --version<\/span>\nMackup 0.8.33<\/code><\/pre>\n\n\n\n<p>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<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>brew install --HEAD<\/code><\/pre>\n\n\n\n<p>Then check the version installed<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mackup -h<\/code><\/pre>\n\n\n\n<p>In case you have an older version of mackup and you would like to upgrade it in your Mac, simply run the commands below:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>brew update\nbrew upgrade\nmackup \u2014version<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Install on Linux as well as macOS using pip<\/h3>\n\n\n\n<p>This method of installation depends on Python and pip. These must be installed before running the commands that follow<\/p>\n\n\n\n<p>With Python&#8217;s PIP<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong><em>#Pip2\n<\/em><\/strong>sudo pip install mackup\n\n<meta charset=\"utf-8\"><strong><em>#Pip<\/em>3<\/strong>\n<meta charset=\"utf-8\">sudo pip3 install mackup<\/code><\/pre>\n\n\n\n<p>And now you can confirm the version installed using the now familiar command<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mackup \u2014version<\/code><\/pre>\n\n\n\n<p>Upgrade mackup with Python&#8217;s PIP<\/p>\n\n\n\n<p>We can also use pip to upgrade over versions of mackup. Simply run the command below then check the installed version<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pip install --upgrade mackup\nmockup \u2014version<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Configuration of mackup for backups<\/h2>\n\n\n\n<p>All the configuration is done in a file named .mackup.cfg stored at the root of your home folder.<\/p>\n\n\n\n<p>To configure Mackup, create a file named <em>.mackup.cfg<\/em> in your home directory.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>vim ~\/.mackup.cfg<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Storage<\/h3>\n\n\n\n<p>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.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">1. Dropbox<\/h4>\n\n\n\n<p>You can configure Dropbox as your storage engine as follows in the <em>.mackup.cfg<\/em> in your home directory. Mackup will figure out where your Dropbox directory is and store your configuration files in it.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ <span class=\"has-inline-color has-pale-pink-color\">vim ~\/.mackup.cfg<\/span>\n&#91;storage]\nengine = dropbox<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">2. Google Drive<\/h4>\n\n\n\n<p>If you choose the <em>google_drive<\/em> storage engine instead, Mackup will figure out where your Google Drive directory is and store your configuration files in it. Open up the <em>.mackup.cfg<\/em> in your home directory and set the following Configuration.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ <span class=\"has-inline-color has-pale-pink-color\">vim ~\/.mackup.cfg<\/span>\n&#91;storage]\nengine = file_system\npath = Google Drive\/My Drive<\/code><\/pre>\n\n\n\n<p>You can download Google Drive from their <a href=\"https:\/\/www.google.com\/drive\/download\/\" target=\"_blank\" rel=\"noreferrer noopener\">Downloads Page<\/a>. Install it and sign in to your google account when prompted. Then grant requisite permissions when prompted as shared below.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">3. iCloud<\/h4>\n\n\n\n<p>Just like Dropbox and Google Drive, you can configure iCloud as your storage engine as follows in the <em>.mackup.cfg<\/em> in your home directory. Mackup will figure out where your iCloud folder is and store your configuration files in it.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ <span class=\"has-inline-color has-pale-pink-color\">vim ~\/.mackup.cfg<\/span>\n&#91;storage]\nengine = icloud<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">4. Copy<\/h4>\n\n\n\n<p>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 <em>.mackup.cfg<\/em> in your home directory and set the following Configuration.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ <span class=\"has-inline-color has-pale-pink-color\">vim ~\/.mackup.cfg<\/span>\n&#91;storage]\nengine = copy<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">How to use Mackup<\/h2>\n\n\n\n<p>Once you have installed mackup and configured your storage backend of choice, you can use the following commands to get started<\/p>\n\n\n\n<p>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 \u201cMackup\u201d in your local sync directory that your application settings will be stored in and synced to your storage engine. Simply type in \u201cYes\u201d.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ <span class=\"has-inline-color has-pale-pink-color\">mackup backup<\/span>\nMackup needs a directory to store your configuration files\nDo you want to create it now? &lt;\/Users\/johnkibet\/Google Drive\/My Drive\/Mackup&gt; &lt;Yes|No&gt; Yes<\/code><\/pre>\n\n\n\n<p>Restoring your application settings on a newly installed workstation. On the new system, install the respective client application that will \u201ctalk\u201d to your storage engines of choice, install mackup then run the command below.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ <span class=\"has-inline-color has-pale-pink-color\">mackup restore<\/span>\n# Sample output\n\nRestoring .zshrc ...\nYou already have a file named .zshrc in your home.\nDo you want to replace it with your backup ? &lt;Yes|No&gt;Yes<\/code><\/pre>\n\n\n\n<p>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.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mackup uninstall<\/code><\/pre>\n\n\n\n<p>Display the list of applications supported by Mackup. You will see an output similar to the truncated list shared.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ <span class=\"has-inline-color has-pale-pink-color\">mackup list<\/span>\nSupported applications:\n - 1password-4\n - 2do\n - ack\n - adium\n - adobe-camera-raw\n - aerc\n - affinity-designer\n - affinity-photo\n - affinity-publisher\n - airmail\n - akamai-cli<\/code><\/pre>\n\n\n\n<p>You can also view the configuration files of a particular application as demonstrated below using <em>zsh<\/em><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ <span class=\"has-inline-color has-pale-pink-color\">mackup show zsh<\/span>\nName: Zsh\nConfiguration files:\n - .zlogout\n - .zshenv\n - .zprofile\n - .zshrc\n - .zlogin<\/code><\/pre>\n\n\n\n<p>Get some help.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$<span class=\"has-inline-color has-pale-pink-color\"> mackup -h<\/span>\n\n# You will see\nMackup.\n\nKeep your application settings in sync.\nCopyright (C) 2013-2021 Laurent Raufaste &lt;http:\/\/glop.org\/&gt;\n\nUsage:\n  mackup list\n  mackup &#91;options] backup\n  mackup &#91;options] restore\n  mackup show &lt;application&gt;\n  mackup &#91;options] uninstall\n  mackup (-h | --help)\n  mackup --version<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Personalizing your mackup backup<\/h2>\n\n\n\n<p>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.<\/p>\n\n\n\n<p>Open up your terminal and edit the <em>.mackup.cfg<\/em> file. Add the section \u201c<em>[applications_to_sync]<\/em>\u201d 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.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$<span class=\"has-inline-color has-pale-pink-color\"> vim ~\/.mackup.cfg<\/span>\n&#91;applications_to_sync]\nzsh\nadium\nakamai-cli<\/code><\/pre>\n\n\n\n<p>Nevertheless, you can choose to ignore a couple of applications that you can sync. Add another section beginning with \u201c<em>[applications_to_ignore]<\/em>\u201d as illustrated below.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ <span class=\"has-inline-color has-pale-pink-color\">vim ~\/.mackup.cfg<\/span>\n&#91;applications_to_ignore]\n\nwebstorm\nwget\nwhatsapp\nwireshark<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Uninstalling Mackup Tool<\/h2>\n\n\n\n<p>When all is said and done and you would like to eject mackup from your giant house, then you can run the following commands.<\/p>\n\n\n\n<p>Uninstall with Homebrew (OSX only)<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>brew uninstall mackup<\/code><\/pre>\n\n\n\n<p>Uninstall with Python&#8217;s PIP<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><meta charset=\"utf-8\"><strong><em>#pip3\n<\/em><\/strong><meta charset=\"utf-8\">sudo pip3 uninstall mackup\n\n<strong><em>#pip2\n<\/em><\/strong>sudo pip uninstall mackup<\/code><\/pre>\n\n\n\n<p>References:<\/p>\n\n\n\n<p>There is a tonne of other settings and that you can still do with mackup and the following references will help you<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"https:\/\/github.com\/lra\/mackup\/blob\/master\/doc\/README.md\" target=\"_blank\" rel=\"noreferrer noopener\">Mackup Configuration<\/a><\/li><li><a href=\"https:\/\/github.com\/lra\/mackup\/\" target=\"_blank\" rel=\"noreferrer noopener\">Mackup GitHub Page<\/a><\/li><li><a href=\"https:\/\/github.com\/lra\/mackup\/blob\/master\/INSTALL.md\" target=\"_blank\" rel=\"noreferrer noopener\">Detailed install instructions for Mackup<\/a><\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Concluding Remarks<\/h2>\n\n\n\n<p>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.<\/p>\n\n\n\n<p>Other articles and guides that will serve you well include:<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 &#8230; <a title=\"Backup your Application Settings on macOS|Linux using mackup\" class=\"read-more\" href=\"https:\/\/computingforgeeks.com\/backup-your-application-settings-on-macos-linux-using-mackup\/\" aria-label=\"Read more about Backup your Application Settings on macOS|Linux using mackup\">Read more<\/a><\/p>\n","protected":false},"author":7,"featured_media":17657,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8718,299,47,50,320],"tags":[36423,36421,36422,36520],"cfg_series":[],"class_list":["post-110777","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-backup","category-how-to","category-linux","category-linux-tutorials","category-macos","tag-app-settings-backup","tag-backup-and-restore","tag-mackup","tag-mackup-backups"],"_links":{"self":[{"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/posts\/110777","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/comments?post=110777"}],"version-history":[{"count":0,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/posts\/110777\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/media\/17657"}],"wp:attachment":[{"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/media?parent=110777"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/categories?post=110777"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/tags?post=110777"},{"taxonomy":"cfg_series","embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/cfg_series?post=110777"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}