How-To Geek

How To Easily Back Up Your Gmail and Perform Scheduled Backups With GMVault


We all know backups are important, but we rarely think about backing up our email. GMVault can automatically back up your Gmail to your computer and even restore the emails to another Gmail account – convenient when switching Gmail addresses.

We’ve also covered using Thunderbird to back up your web-based email account, but GMVault has a few advantages, including its integrated restore function and easy integration with the Windows Task Scheduler.

Gmail Setup

You’ll have to change a few settings in Gmail before you begin. First, on the Forwarding and POP/IMAP tab in your Gmail account’s settings page, ensure IMAP is enabled.


On the Labels pane, ensure the all labels are set to Show in IMAP. Any labels that aren’t visible in IMAP won’t be backed up.


GMVault Setup

Download and install GMVault from GMVault’s website. Once it’s installed, you can launch GMVault from the gmvault-shell shortcut on your desktop or Start menu.


GMVault doesn’t provide a graphical user interface, but using it is easy.

To start syncing an account’s emails to your computer, type the following command into the GMVault window, where is your Gmail account address:

gmvault sync


Ensure you’re logged into the Gmail account you specified in your default browser and press Enter.


GMVault will request an OAuth token – click the Grant access button to continue and allow GMVault access to your email account.


Go back to the GMVault window, press Enter, and GMVault will automatically back up your emails to your computer.


Updating and Restoring Backups

To update your backup in the future, just run the same command again:

gmvault sync

You can also use the -t quick option – when you use this option, GMVault will only check for new emails, deletions, or changes from the past week. This makes performing a backup much faster.

gmvault sync -t quick

If you want to restore your Gmail to another Gmail account in the future, run the following command:

gmvault restore

Your authentication credentials are stored in the C:\Users\NAME\.gmvault folder, while your email backups are stored in the C:\Users\NAME\gmvault-db folder. You can back up the gmvault-db folder to create another backup of your emails.


Creating a Scheduled Backup

You can now run the above commands to quickly update your backup. However, if you want to perform regular backups without thinking about it, you can create a scheduled task that automatically backs up your email.

First, open the Task Scheduler by typing Task Scheduler into your Start menu and pressing Enter.

Click the Create Basic Task link at the right side of the window.

Name your task and set the trigger to Daily.


Set the task to run every one days or every few days, whichever you like.

(Note that GMVault’s -t quick option only checks the previous week of email by default, so you’ll want to have this task run at least once a week.)


On the Action pane, select Start a Program and navigate to the gmvault.bat file. By default, this file is installed to the following location:



In the Add arguments box, add the following arguments, replacing with your Gmail address:

sync -t quick


To verify that your scheduled task is working properly, you can right-click it in the Task Scheduler window and select Run. The GMVault window will appear and perform a backup.


GMVault will now automatically update your back up with new emails and changes on the schedule you specified. If you want to be sure no emails or other changes are missed, you can run a full backup command (without the -t quick option) occasionally.

Chris Hoffman is a technology writer and all-around computer geek. He's as at home using the Linux terminal as he is digging into the Windows registry. Connect with him on Google+.

  • Published 09/25/12

Comments (23)

  1. eleazar

    Is there an app like this for linux? (ubuntu if possible)

  2. Johann

    Hmmm… so if you grant access to your inbox to the gmvault binary, can any version of this binary access your email? I.E. can anyone get your emails out using it once your GMail ‘trusts’ gmvault?

  3. Green Star


    There is a ‘Python Source distribution’ available in GMVault website, which can be used in Linux distributions. I haven’t tried it yet, so I am not sure the usage will be same as explained here or not.

  4. jtylerb

    If you have multiple gmail accounts to back-up do you just create additional *.bat files and point the task scheduler to them?

  5. cam2644

    I’d rather stick to the Thunderbird back up of my non Gmail account.Gmail is good but like an increasing number of folk I’m reluctant to put all my eggs into Google’s tracking basket.

  6. Enthusiast

    Has anyone verified that GMVault sends nothing back “home”? I would be concerned that the authorization given to gmail may be sent out and be available to others.

    I would suggest that if you use this utility to back up your gmail account, you immediately revoke authorization and change your gmail password, to be safe.

  7. JH

    I see the question but what is the answer? Does/Do any of my emails, either their content or addresses, go to or get stored at GMVault’s site/home/server? Is any DB being created with my stuff anywhere but on my own machine?

  8. Ugo

    Like many others here, I’m worried about security. Is this operation safe to perform?

    Does this software run on a mac by the way?

  9. Johann

    I don’t think it’s an issue of whether data gets sent ‘back home’ that should be concerning people here. The same charge could be levied against any email client one could use. The security issue to my mind is more that to my knowledge the ‘authorised sites’ part of GMail grants that ‘site’ access to your data whenever it wants it. Normally this is to a site that you trust (‘Gist’ say to manage your contacts) and you are trusting them with your data. The problem in this case is that you’re not trusting a ‘site’ with a corporate presence etc but rather trusting a little executable…

    Do ALL copies of this executable have the ability to access your data once you’ve set up the trust!?!? If so then this is ridiculous – once you have authorised the gmvault executable to access your email then could ANY copy of it run against your account??

    E.G. If I knew my accountant was using and had authorised gmvault to access his data then can I just run a copy of GMvault against his email address and get his private data?? I think the software creator needs to clarify if this is not the case.

    Google’s authorising sites is a great idea when it’s all locked down and you know you have some kind of trust-relationship with the other party, but for applications I don’t know if the same exists.

    I’d be interested to know if this access is granted only to your single gmvault exe in some way. Personally I’d rather give it my password, or have it use a Google Application Specific password than grant a trust to it.

  10. Johann

    I’m a fool – it clearly says it uses XOAUTH. Looks safe to me.

  11. CJ

    ………… With the greatest respect to howtogeek and all it’s authors, this is by far the least useful tech article I have read all year.

    Out of the many strong reasons to use Gmail, one of the BEST is that I never have to worry about backing anything up!! I mean really… If you are obsessive enough to actually feel the need to back up Gmail, when Google has more servers and data storage and ultra high tech backup systems than God Himself… go see a psychologist, or a shrink, or get laid or something.

    If you actually “backup” Gmail to your personal computer, all you accomplished was to make a copy of insanely secure data, and put it in a highly vulnerable place! It’s like taking a picture of gold that is in a vault at Fort Knox, and tucking it under your mattress.

    And even IF I stipulate the validity of backing up Gmail.. which I do not!.. Hell, why not go whole hawg, turn the clock back, and use an “8-track tape” email client like Thunderbird or (shudder) Outlook, and set it up with IMAP so when it pulls off the Gmail server, it archives. I have folks I help out that will not give up their beloved email (brand x) client, so I have set this up a few times. Works slick, if you insist on using an 8-track. Far easier than this.

    I must admit, for a few seconds I thought there might be one potentially useful aspect to this, the ability to D/L everything off a Gmail account and then upload it to another account somewhere… Then I remembered Gmail already lets you do that, easily, with a few clicks. No third party app or command line.

    And if you have security or privacy concerns with your Gmail, which I stipulate could be valid… You should either accept that NOTHING is private in this day and age, or stop using Gmail at all, and try to find a provider you think is more secure. Good luck with that.

    Again, deep respect to HowToGeek, I read your stuff regularly and have benefited from it often. But this one… Not.

  12. JohnM

    ya, not useful at all right, because since you pay for gmail you can ask them to restore your account if they remove it or deem it not worth keeping.

    oh wait. they don’t have any obligation to protect or backup your data.
    I would really consider a simply pop link up and download everything to a local email client, in case gmail decides to delete your account

    at least that way you still have your emails.

    putting your trust in google to restore your account and emails when they have no legal obligation to do so, especially if you are not a paying customer of theirs, it really taking a risk :) but hey, it’s your email, do whatever you want with it :)

  13. the idesofmarch

    I dont do much of this chit chat stuff but, CJ is ranting although partly redeems himself by suggesting others might be right to distrust Google.
    Google seems to have managed to lose a goodly number of my emails. If they are not lost I have no idea how to retrieve them.
    Perhaps CJ would say that is not Google’s fault.
    The more of these comments, that come form many types of people, that I read the more I distrust Google, and, to my first hand knowledge Google does not know what privacy means.

  14. Irene

    I had a hard drive crash for the first time this summer and was SO grateful that my gmail and google docs were intact. Now I am relying on them more than ever so backing them up does not seem overly paranoid to me. Especially if it’s an automated task.

    However I think I am missing something…I’m setting everything up on Windows7 and all has gone smoothly until I try to automate this task. I do not find the gmvault.bat file. The closest I get is users\me hp\gmvault-db
    From there I have three folders to choose from .info, db, and quarantine. The .info folder contains:

    Any suggestions?

  15. Pepper Networks

    I had a NGO customer who logged in one day and their Google calendar was blank. They used their calendar to organize things across several continents. In the Google forums, we were able to reach a Google employee who managed to help, but the fact that it happened proves a simple fact. Computers are not infallible. The cloud may have better reliability figures, but it is not imbued with magical perfection. Have a backup system for any data that you don’t want to lose. There are several free options for backing up between 2-5 GB. Most people don’t have too many files that are irreplaceable, and those are a good option to backup your computer to the cloud. I liked this article as it is the first time I’ve actually seen someone come up with an explicit solution for backing up cloud data on a local computer.

    Forego backups only for data that you wouldn’t mind losing.

  16. JV

    A friend of mine is going to be getting his first iPhone and he intends to buy a case AND a separate screen protector. He wont play a computer game until he’s got the official walkthrough. He always reads the manual first and he always drives below the speed limit.

    I’ll send him this article, he might find it useful.

  17. CJ

    Guilty as charged, I WAS in fact ranting, I had had an unusually stressful day, and I blew off some steam in the wrong place.

    Sincere apologies to all, especially to Chris Hoffman, who I always enjoy reading. He writes consistently excellent and informative articles.

    However: In @ 4-5 years of personally using and professionally recommending and setting up Gmail for literally hundreds of people, and putting 5 businesses onto Google Apps, 2 of which I still administer, Google has NEVER lost a single byte of data that I am aware of. I am not saying it isn’t possible, hell, of course it is! I am saying it simply hasn’t happened, not in my experience. I almost exclusively use Google products (both free and paid) to back up all my most critical data. I have done so for years now, personally and professionally.

    This practice may some day bite me in the ass, because Pepper Networks is quite correct, NO method of data storage, no company run by human beings, is infallible. A backup of the backup is never a bad idea. But I would far rather trust Google with my data than trust the hard drive on any “local” machine.

    Actually, Pepper Networks comment is the first credible instance I have ever heard where critical data was misplaced by Google, and according to him in that event they retrieved it. I am certain it has really happened sometime in the past, I just haven’t heard/read about it.

    I completely agree that Gmail is NOT private. Certainly not from Government spying eyes. If you believe some other provider is more private, tracks and utilizes your data less, is less vulnerable to Government intrusion, go right ahead. I personally do not believe it will actually BE any more private, but it may help you retain your illusion of privacy, and I suppose that is worth something. However, that is a side issue here.

    So if you feel safer backing up (arguably) the safest data repository available to normal folks… /shrug Feel free, no skin off my nose. You may even need the backup, someday when Google crashes. When that might be, I invite you to guess. But again, I apologize for ridiculing those who feel safer doing so. Even if Google never loses a single byte of data until Gotterdammerung cometh, I wholeheartedly agree that (multiple!) backups of critical data are always a good thought.

    To the idesofmarch: if you really believe Gmail lost “several” emails of yours, I would be happy to help you find them, no charge. 702-250-0415. Yes, that IS my real business phone number. Who knows, you may be the first time I ever get to personally see Google actually lose something. Honestly, that would be kind of cool.

  18. dude.

    Google might not lose it.

    Google might decide you don’t have the right to access their services any more, and cut you off. I know a girl who was pretty active with another major free service, and had over a decade’s worth of email on their servers. Somebody at the company took a dislike to something she posted in one of their forums, and cut her off, cold.

    Boom, gone. They refused to let her access her email or anything else, again. They wouldn’t even say what they objected to, they just said “read the terms of service”. she absolutely wishes she’d had a backup, because a large part of her records over the years were cut off

    I know it’s 100% true, because I was with her that day she suddenly couldn’t log in, and found the customer service contact info. It was a very bad week.

    If it’s worth keeping, it’s worth backing up.

  19. lrgallardo

    very useful post. i have it up and running on my windows machine, but could not install it in my ubuntu computer. I am running ubuntu 10.04. I cannot get to un tar the file that I download. Can you please help? Maybe right an article on how to install it in ubuntu?

  20. zoobert

    I am the Gmvault developer. First Thanks a lot for this great how to article. It is clear and concise and describe in great ways how to take advantage of Gmvault.
    Before to dig in the security questions, I would like to mention that Gmvault is available for Windows, MacOSX and Linux from Documentation for installation and on how to use it is available here

    Regarding the “Security topic”, Gmvault is using XOAUTH which is the mechanism recommended by Google, to allow applications to access Gmail via IMAP.
    To simplify, XOAUTH is a SASL mechanism generating a secure token that is stored in $HOME/.gmvault and with this token, Gmvault can access the Gmail IMAP server to download or upload the emails. All communications are encrypted TLS/SSL communications.

    Without the XOAUTH token there is no possibility to access the corresponding gmail account so there is no non-sense of having the Gmvault of Joe accessing the Gmail account of Lydia because Lydia granted gmvault access to it Gmail. You only grant the right for Gmvault to access your Gmail account (and only) with an XOAUTH token, that is all.

    Gmvault has no more rights than an Email Client like Apple Mail or Thunderbird and the way to access emails is safer than these traditional email clients because Gmvault doesn’t use your Gmail password which is your password for all Google service (it is based on the XOAUTH token granting only access to Gmail IMAP).
    There is also no data sent to any kind of servers apart the Gmail server. Gmvault is a standalone application that only accesses Gmail.
    If you are afraid of any security issues, you can look at the code that is freely available here:

    Finally regarding the non necessity of doing backups, Google doesn’t guaranty to backup your emails and cannot be held responsible if your account has been hacked and your emails lost. In most cases of poeple having lost their emails on the web, you will see that Google gently managed to restore the last 3 months of emails and never its entirety.
    I started this project because I had more than 5 years of emails in Gmail and it would be disastrous for me to loose them.

    Anyway enjoy this open source project and if you are happy with it please support it here:

    Many thanks

  21. JohnM

    “Google might decide you don’t have the right to access their services any more, and cut you off. ”

    this! has already happened too, when Google+ was launched, they disabled accounts of some people, at the same time all their google accounts were blocked, including gmail. So backing up the data is not just “in case of a crash” but as mentioned earlier “in case gmail decides to delete your account”


  22. carrie

    I have just come back to this article, since the email account of my young son was disabled. Definitely a good idea to have a backup if google suddenly decides to block your account.

  23. BV

    Assuming Gmail is rock solid and will never lose your data, there is still a reason to backup your mail. If you somehow forget your login or your account is hacked or like JohnM says, they cut you off.

More Articles You Might Like

Enter Your Email Here to Get Access for Free:

Go check your email!