How to Setup GMVault Gmail Backup on Linux

gmvault gmail backup

GMVault is a user-friendly cross-platform and very lightweight command-line tool that setup most of the necessary rich features to backup and restore your gmail account. You can download it for free and install it on your computer using CLI. You can use it to backup your Gmail account to your computer, and use quick sync mode to update the backup regularly with recent emails. You can even only backup certain emails using search parameter or date range, and also encrypt the emails you backup. Plus, using some advanced parameters, you can clone your one Gmail account to another, including labels and other attributes.

Although there are bunch of ways to backup your Gmai but Gmvault is one of the most favourable for being feature-rich and highly customizable available for Windows/Mac/Linux.

Downloading GMVault

Download the latest version of Gmvault and select the right version according to your platform from its download page.

Gmvault Download

We will be using the Python Source distribution which is recommended for installing on Linux and valid for all platforms (Linux, Mac OSX, Windows). The only requirement for this is that you must have a Python 2.7.x or 2.6.x preinstalled on your Linux server whether it is Ubuntu or CentOS.

Let's copy the link location for the package and then execute the command as shown below to download the package on your Linux server.

# wget

Extract the Archive

After downloading the Gmvault latest package, we need to extract this archive using the below command.

# tar -zxvf gmvault-v1.9-src.tar.gz

extract archive

Installing Gmvault

Before starting the installation of GM vault, make sure that the Python packages are installed on your server as a prerequisites. If they are not available on your default server then install by using below command.


# apt-get install python python-setuptools


# yum install python python-setuptools

After that change your directory to the extracted Gmvault folder and execute the below command as to run the installation setup.

# python install
gmvault installation

Using Gmvault

Run the following command to get help about all available options before using Gmvault.

# gmvault -h
using gmvault

Once the the installation process complete then we will be using the below command to sync our gmail account with Gmvault.

# gmvault sync
gmvault setup

The will ask you to press enter to open a new windows of your browser and takes you through an authentication process with your email account.

So login to your gmail account that you wish to integrate with Gmvault and allow it access to view and manage your Emails.

gmvault authentication

After authentication you will be provided and OAuth tokento run custom synchronization of your certain emails but it could be a better if you use your user and the password for manual authentication.

If you want a quick sync betwen your emails then run the following command on your server.

# gmvault sync --type quick

By default, Gmvault restore the emails from $HOME/gmvault-db or %HOME%/gmvault-db into the given account. You can use the -d or --db-dir to point to another local email repository.
You might have to enter into an authentication phase if it is a new account for gmvault. Gmvault will store all credentials into $HOME/.gmvault (or %HOME%/.gmvault for Windows) and you can always go this directory and delete them if you wish.

Gmail Settings

To configure Gmail to working optimally with Gmvault, we need to check that Gmail is properly configured to let Gmvault work optimally. In Gmail, the IMAP access needs to be enable and the limit of number of emails per IMAP folders needs to be disabled.
Let's choose the 'settings' option and then click on the 'Forwarding and POP/IMAP' option to Enable your POP and IMAP for all your emails as shown in the image below.

Enable IMAP

After saving these changes click on the 'Label' option on the top bar to enable option for enabling the IMAP for Chat and all of your Emials.

Gmail setup


Great, Gmvault is a user friendly command-line tool that setup most of the necessary defaults to quickly sync (backup) your gmail account or restore it to a gmail account. Now you don't need to be worry about losing your important emails backup after setting up the Gmvault backup on your Linux server. Thank you for reading this article will be get back with new article for you. Don't hesitate to leave your valuable comments and suggestions.

Leave a Comment