Synology Gmail Backup, Again

January 11, 2015 1 min read

Using GMVault to back up Google Apps email to my Synology DS214 has been great, when it works. And it seems like it fails pretty often: software update, token expiration, strong gust of wind, etc.

My original article from April 2014 turned into a bit of a mess, but after a few reinstalls and helpful comments (thanks David and Simon) I’ve got a much shorter set of instructions:

  1. Install the Python (2.7) package from the Synology package manager.
  2. SSH into the Synology box as root.
  3. Download and install pip:

    wget https://bootstrap.pypa.io/get-pip.pypython get-pip.py
  4. Use pip to install virtualenv:

    <pre><code>pip install virtualenv</code></pre>
  5. Log in as your normal user, and cd to wherever you want to install GMVault.
  6. Set up a virtual environment for GMVault to run in:

    <pre><code>virtualenv gmvault_env</code></pre>
  7. Install GMVault in this little environment: <pre><code>cd gmvault_env/bin./pip install --verbose --pre gmvault --allow-external IMAPClient</code></pre>

Now you can run ./gmvault from this directory, or put together scripts that reference it by full path.

If you’re like me and your backups frequently see IMAP timeouts, don’t forget to cd ~/.gmvault and edit gmvault_defaults.conf so that enable_imap_compression=False.

***
Matt Stein’s face

by Matt Stein

Full stack tinkerer, sporadic blogger and Craft CMS fan occasionally found on the devMode.fm podcast.

Updated 10/15/19 at 2:10am