Keeping a local backup of your Gmail accounts is a clever move, and in this post I’ll detail how I managed to do this using the Gmvault open source script. The instructions below are targeted towards Mac users, but the process should be similar on other operating systems. The latest version of Gmvault at the time of writing was v1.9.1.
Before starting off with Gmvault, I installed Python (the programming language that Gmvault is written in) and Pip, a package manager that lets me install packages from the Python Package Index. The latest version of Mac OS X, High Sierra, comes with Python 2.7 out of the box. This is handy but not the ideal way to have Python on your system. I therefore followed this guide to install Python the right way, including Xcode and Homebrew (a package manager similar Linux’s APT). You will end up with two versions of Python, accessible in the Terminal via the commands python and python2.
These are not absolute pre requisites for working with Gmvault, so you might choose a different route if you wish. The basic pre-requisite is to have Python 2.7 running on your system. To follow the steps below to the letter you will have to install what I installed, however.
- pip2 install gmvault
- gmvault sync yourgmailaddress
This will start downloading all your emails to a gmvault folder under in your home folder. That’s it. The next step if you want to automate things would be to write a script and have your OS run it say on a daily basis so that you can keep an automatic backup.