How To Backup Gmail In Ubuntu Intrepid

It is a misconception to think that all the emails in your Gmail account are safe and will be there forever. In the events that Gmail is down, or for some reasons, you were banned by Google, you won’t be able to access all your emails and all of them will be gone forever. To prevent such incident from happening, you might want to backup your mail in your Gmail account to your system. Come to think of it, you backup your system regularly because all the data and files in your computer are important to you. If your emails are important to  you, shouldn’t you do a backup too?

Gmail-backup is an application that allows you to backup/restore your Gmail. It has an easy to use interface and few configurations are needed to get it to work. Other than backing up your emails, you can also use it to migrate your mails from one Gmail account to another.  This tutorial will teach you how to backup your Gmail account in Ubuntu Intrepid.

Download Gmail-backup for Linux here

Extract the folder to your Home folder. You should see a folder with the name gmail-backup-0.105-linux (the folder name will change according to the version). For simplicity sake, rename the folder to gmail-backup.

Install the dependencies

sudo apt-get install python2.5 python-wxversion

In your Gmail account, go to Settings -> Forwarding and POP/IMAP


Check the Enable IMAP and Save Changes.

Back to your terminal, run the command:

cd ~/gmail-backup && ./


Enter the login credential, backup destination and the range of date to backup. Click Backup to start the backing up process.

That’s it. All your mails in your Gmail account is now backed up in your system.

Creating an entry in the menu

It can be a troublesome task to go to the terminal and type a bunch of command just to activate the Gmail-backup application. An easier way is to create an entry in the menu.

In your terminal,

gedit ~/gmail-backup/

Change the following command

exec python2.5 -O gmail-backup-gui.pyo $@


exec python2.5 -O `dirname $0`/gmail-backup-gui.pyo $@

Save and exit.

On the top panel, right click on Applications and select Edit menus


On the left pane, Select the Internet. On the right, click New Item. Enter the following information. Remember to change the USERNAME to your own user ID.


Click Close. You can now access Gmail-backup via Applications -> Internet -> Gmail backup now.

Damien Damien

Damien Oh started writing tech articles since 2007 and has over 10 years of experience in the tech industry. He is proficient in Windows, Linux, Mac, Android and iOS, and worked as a part time WordPress Developer. He is currently the owner and Editor-in-Chief of Make Tech Easier.


  1. Great post! We use Ubuntu 8.10 and love it! Gmail is our favorite free mail service. It’s very nice to know how to back up our mails with Ubuntu 8.10. Thanks!

  2. Backing up right now, takes a little while cause I have a couple of gigas in the gmail account. Works perfectly so far.

    I would want to add the icon of gmail-backup in my system launcher. wonder how to do this.


    1. On the last step where you add the entry to the menu, click on the icon on the left. This will pop up a window asking you to choose the icon for this entry.

  3. I know I can set up IMAP but it won’t download every single email and attachment. Is this a good way to get everything downloaded and imported to a mail program?

  4. I tried this out… But I am getting this error:

    RuntimeError: Bad magic number in .pyc file

    Cab you help me out??

    1. Did you install the dependencies?

      Download the latest version of gmail backup and try again.

  5. having trouble, getting segmentation fault… i used to get it when display buffers were overloaded when i was developing opengl apps… any ideas?

Comments are closed.