Skip to content

alacn1/gdrivebackend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Duplicity Google Drive Backend

Backend installation

It was tested on duplicity 0.7.06.

To install copy gdrivebackend.py to duplicity's backends directory.

/usr/lib/python2.7/dist-packages/duplicity/backends/

Dependency installation

It requires google-api-python-client: https://github.com/google/google-api-python-client

To install execute:

pip install --upgrade google-api-python-client

or:

easy_install --upgrade google-api-python-client

Configuration

At google developer console: https://console.developers.google.com

  • Create a project.
  • Enable Drive API for it.
  • Create a Service Account or Installed App credential.

To configure with Installed App credential:

  • Create a Installed App credential at google developer console.
  • Get client id and client secret key.
export GDRIVE_APP_TOKEN_FILE='path_to_save_token_file.key'
export GDRIVE_APP_SECRET='client_secret_key'
gdrive://installed_app_client_id/path
  • Run duplicity to get authorization url.
export GDRIVE_APP_CODE='response_code'
  • Run duplicity to generate the token file.

Now GDRIVE_APP_CODE isn't needed any more and can be removed.

To configure with Service Account credential:

Note that Service Account has it's own drive, it won't upload to your drive.

  • Create a Service Account credential at google developer console.
  • Get service account email address.
  • Generate a .json key file.
export GDRIVE_SERVICE_KEY_FILE='path_to_key_file.p12'
gdrive://service_account_email/path

About

Duplicity Google Drive Backend

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages