Skip to content
This repository has been archived by the owner on Jan 25, 2021. It is now read-only.

ojarva/google-backup

Repository files navigation

Backup for Google services

Current status

This collection of programs is no longer maintained, and contains multiple bugs. This was in use around 2014, but many things have changed since.

Overview

Backs up Gmail/Drive/Calendar. Uses domain wide authentication, so no authorization from Google Apps users is necessary. Emails are downloaded using modified offlineimap and XOAUTH2.

Installation

Google API authorization

  • Go to Google API Console
  • Create new project
  • Open "Services" and enable "Admin SDK" (for downloading list of users), "Calendar API", "Drive API" and "Drive SDK".
  • Open "API Access" and create new client ID. Select "Service account". Save the private key to program folder. Remember to protect the private key appropriately.
  • Take note of the first client ID and email address.
  • Create a second client ID for getting list of users from directory API. Select "Installed application", "Other".
  • Download second "client_secrets.json" using "Download JSON" link. Put "client_secrets.json" to program folder.

Next, domain-wide authorization:

On the first run, authorization URL is printed out. Open the URL with admin user, check that only readonly access to your user list is required and click "Authorize". Copy authentication token and paste it back to the terminal.

Dependencies and settings

  • pip install -r requirements.txt
  • Move settings.py.sample to settings.py. Modify it with values obtained above from API console.

System Requirements

  • Currently hardcoded to use zfs utility
  • Requires OfflineIMAP for email sync

Releases

No releases published

Packages

No packages published

Languages