{"id":305,"date":"2012-05-25T14:00:44","date_gmt":"2012-05-25T22:00:44","guid":{"rendered":"https:\/\/digitalcardboard.com\/blog\/?p=305"},"modified":"2012-11-26T09:28:50","modified_gmt":"2012-11-26T17:28:50","slug":"gmvault-gmail-backup-ubuntu-install-and-setup","status":"publish","type":"post","link":"https:\/\/digitalcardboard.com\/blog\/2012\/05\/25\/gmvault-gmail-backup-ubuntu-install-and-setup\/","title":{"rendered":"Gmvault: gmail backup (Ubuntu install and setup)"},"content":{"rendered":"<p><em>(edit 8\/20\/2012: Originally written for v1.5, this has been tested and works fine as of\u00a0<strong>Gmvault v1.7-beta<\/strong>, so just change things accordingly and install away! I&#8217;ve updated the links below.)<\/em><\/p>\n<p>I\u2019ve been using <a href=\"http:\/\/pyropus.ca\/software\/getmail\/\" target=\"_blank\"><strong>getmail<\/strong><\/a> for over a year to backup my Gmail account. As far as I know, it\u2019s been working, but it just grabs email over POP, dumps them into an mbox file, and that\u2019s that. It\u2019s a fairly basic procedure, but since it just blindly downloads emails, getmail doesn\u2019t account for ones I\u2019ve deleted, and I don\u2019t know if it keeps any label information.<\/p>\n<p>So along comes <a href=\"http:\/\/gmvault.org\" target=\"_blank\"><strong>Gmvault<\/strong><\/a>, the new kid on the block with fancy restore features and multiple OS capability. Let\u2019s give it a shot.<\/p>\n<p>Python should be installed on a default Ubuntu machine, but let\u2019s install a few other pre-requisites as well. I&#8217;m using Ubuntu 12.04\u00a0LTS (Precise Pangolin).<\/p>\n<p><code>sudo apt-get install python python-setuptools<br \/>\nsudo easy_install -U distribute<\/code><\/p>\n<p>Then download the source package for Gmvault:<\/p>\n<p><code>wget\u00a0<a href=\"https:\/\/github.com\/downloads\/gaubert\/gmvault\/gmvault-v1.7-beta-src.tar.gz\" target=\"_blank\">https:\/\/github.com\/downloads\/gaubert\/gmvault\/gmvault-v1.7-beta-src.tar.gz<\/a><\/code><\/p>\n<p>Unpack it:<\/p>\n<p><code>tar xvzf gmvault-1.7-beta-src.tar.gz<\/code><\/p>\n<p>Then install!<\/p>\n<p><code>cd gmvault-1.7-beta\/<br \/>\nsudo python setup.py install<\/code><\/p>\n<p>The basic setup is about as simple as it comes:<\/p>\n<p><code>gmvault sync your_email@gmail.com<\/code><\/p>\n<p>The setup process will take you through an authentication process with your email account.<\/p>\n<p>Since I ran the install on an Ubuntu headless server, it loaded the text-based w3m browser, which I was able to login to my account, but then was unable to approve Gmvault to access my email. Pressing <em>\u2018q\u2019<\/em> quits the browser and you\u2019ll be presented with with an OAuth link you can copy into a normal browser and authorize Gmvault that way. (Note: you can <a href=\"https:\/\/accounts.google.com\/b\/0\/IssuedAuthSubTokens?hl=en_US\" target=\"_blank\">manage what apps can access your Google Account at any time<\/a>)<\/p>\n<p>Once Gmvault is given the okay, it\u2019ll start churning away downloading emails. Give it a few minutes (or hours) to finish, and feel better knowing that your hoard of oh-so-important emails are now tucked away in yet another location.<\/p>\n<p>There\u2019s a few other parameters you can pass to the program, which will allow you to change the vault database location, provide a user\/pass rather than the OAuth token, and to run custom synchronization of certain emails. Take a look at the <a href=\"http:\/\/gmvault.org\/in_depth.html\" target=\"_blank\">in-depth documentation on Gmvault<\/a>.<\/p>\n<p>After running the initial sync, you can run the following command to run a quick sync (only the last 2 months are scanned):<\/p>\n<pre>gmvault sync --type quick your_email@gmail.com<\/pre>\n<p>Restoration of emails appears to be straightforward (although I haven&#8217;t tried it) and emails are stored in month folders as individual <em>.eml.gz<\/em> and <em>.meta<\/em> files. The gzipping appears to be fairly efficient, as the Gmvault database reports to be about 2\/3rds the reported size of my Gmail inbox. Not bad at all!<\/p>\n<p>Also&#8211;for the sake of completeness, a few days after I wrote this I found out about <strong><a href=\"http:\/\/bagoma.sourceforge.net\/\" target=\"_blank\">BaGoMa<\/a><\/strong>, which is another Python-based utility to backup your Gmail. Seems to follow a similar path as Gmvault, but I like Gmvault&#8217;s ability to use OAuth rather than have to provide my password each time.<\/p>\n<p>So far,\u00a0<strong><a href=\"http:\/\/gmvault.org\/\" target=\"_blank\">Gmvault<\/a><\/strong>\u00a0appears to have a simple and easy to use product that fits my needs. Good work!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>(edit 8\/20\/2012: Originally written for v1.5, this has been tested and works fine as of\u00a0Gmvault v1.7-beta, so just change things accordingly and install away! I&#8217;ve updated the links below.) I\u2019ve been using getmail for over a year to backup my Gmail account. As far as I know, it\u2019s been working, but it just grabs email [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[8,29],"tags":[85,17,88,86,23,87,79],"class_list":["post-305","post","type-post","status-publish","format-standard","hentry","category-software","category-system-administration","tag-backup","tag-gmail","tag-gmvault","tag-howto","tag-linux","tag-sync","tag-ubuntu"],"_links":{"self":[{"href":"https:\/\/digitalcardboard.com\/blog\/wp-json\/wp\/v2\/posts\/305","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/digitalcardboard.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/digitalcardboard.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/digitalcardboard.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/digitalcardboard.com\/blog\/wp-json\/wp\/v2\/comments?post=305"}],"version-history":[{"count":5,"href":"https:\/\/digitalcardboard.com\/blog\/wp-json\/wp\/v2\/posts\/305\/revisions"}],"predecessor-version":[{"id":322,"href":"https:\/\/digitalcardboard.com\/blog\/wp-json\/wp\/v2\/posts\/305\/revisions\/322"}],"wp:attachment":[{"href":"https:\/\/digitalcardboard.com\/blog\/wp-json\/wp\/v2\/media?parent=305"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/digitalcardboard.com\/blog\/wp-json\/wp\/v2\/categories?post=305"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/digitalcardboard.com\/blog\/wp-json\/wp\/v2\/tags?post=305"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}