Home Linux Tips & Tricks How To Backup And Restore Application Settings Using Mackup On Newly Installed Linux System

How To Backup And Restore Application Settings Using Mackup On Newly Installed Linux System

By sk
Published: Last Updated on 1.8k views

This guide explains what is Mackup, and how to backup and restore application settings with Mackup on a freshly installed Linux system.

What is Mackup?

Mackup is a command line application to keep your application settings in sync. Mackup is used to backup the application settings of a Linux and Unix-like operating systems and restore the settings on any newly installed system at any time.

If you happen to reinstall OS frequently, Mackup can help you to backup the applications settings from the old system and restore them to the newly installed system, thus saving a great amount of time and effort.

Mackup uses Dropbox by default to backup the application settings. You can also configure it to use other cloud storage providers like Google Drive, Copy and iCloud.

Please be mindful that Mackup is not meant for restoring application settings across different operating systems. The version of installed applications should be same on source and destination systems.

The word mackup is just a portmanteau of Mac and Backup. The author of Mackup initially developed it for Mac OS. However, Mackup should also work in any other operating systems that supports Python.

Using Mackup, we can restore the settings of popular applications such as Adobe Photoshop, Bash, Chef, Docker, Emacs, Fish, Git, Heroku, i3, JSHint, Kdenlive, Libre Office, Mac OS X, MATLAB, MySQL, Microsoft Asure CLI, NPM, openSSH, Perl, R language, Spotify, Terminal, Vim, Wordpress CLI, Xcode, Zsh and a lot more. You can view the complete list of supported applications here.

And of course, if your favorite software is missing, you can request the developer's to add it via the GitHub page which is linked at the end of this guide.

Install Mackup in Linux

Make sure you have installed Dropbox on the source system. If you haven't installed Dropbox already, refer the following link.

Since Mackup is a Python application, we can easily install using PIP. If you haven't installed PIP already, refer the following link.

After installing PIP, run the following command to install Mackup.

$ pip install --upgrade mackup

Mackup can also be installed using Linuxbrew package manager. If you haven't installed Linuxbrew yet, follow the steps provided in the link given below and install it.

After that, install mackup using command:

$ brew install mackup

Now let us go ahead and see how to backup and restore application settings.

Backup And Restore Application Settings Using Mackup In Linux

First, we will see how to backup applications settings.

1. Backup Application Settings

To backup the application settings on your Linux system, run:

$ mackup backup

Type Yes to create a new folder named "Mackup" in your local dropbox sync folder and sync your configuration files to your synced storage. Just use this the first time you use Mackup. Please note that by default this will sync private keys used by OpenSSH and GnuPG.

As I mentioned earlier, Mackup will backup and store the application settings in Dropbox by default. You can, however, configure mackup to use a different backend, such as google_drive, copy and file_system, with a .mackup.cfg file. For detailed configuration, refer this link.

2. Restore Application Settings On Newly Installed Linux system

Go to your newly installed Linux system and install Mackup and Dropbox as described in the Install section above. Then, restore the application settings using command:

$ mackup restore

Mackup will ask you to overwrite the existing file with the backup files. Type Yes and hit ENTER to restore all configurations files.

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

It's that simple.

To view the list of supported applications, just run:

$ mackup list

To reset everything to their original state, simply run:

$ mackup uninstall

Type Yes to revert back all changes.

You are going to uninstall Mackup.
Every configuration file, setting and dotfile managed by Mackup will be unlinked and moved back to their original place, in your home folder.
Are you sure ? <Yes|No>Yes
Reverting .bashrc ...
/usr/bin/chattr: Operation not supported while reading flags on /home/ostechnix/.bashrc
Reverting .profile ...
/usr/bin/chattr: Operation not supported while reading flags on /home/ostechnix/.profile
Reverting .bash_logout ...
/usr/bin/chattr: Operation not supported while reading flags on /home/ostechnix/.bash_logout

All your files have been put back into place. You can now safely uninstall Mackup.

Thanks for using Mackup !

For getting help, run:

$ mackup -h

Unlike the Aptik utility, Mackup will work on all Linux operating systems. However, Mackup will backup and restore the application settings only. Aptik can able to backup old PPAs, packages, themes, mount entries, users/groups, Home directory data, and scheduled tasks etc.

Resource:

You May Also Like

Leave a Comment

* By using this form you agree with the storage and handling of your data by this website.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

This website uses cookies to improve your experience. By using this site, we will assume that you're OK with it. Accept Read More