Synology Gmail Backup, Again

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. wget
  4. python to install pip system-wide.
  5. pip install virtualenv to install virtualenv system-wide.
  6. Log in as your normal user, and cd to wherever you want to install GMVault.
  7. virtualenv gmvault_env to set up a virtual environment for GMVault to run in.
  8. cd gmvault_env/bin
  9. ./pip install --verbose --pre gmvault --allow-external IMAPClient to install GMVault in this little environment.

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.

* * *