How to backup Google Drive using duplicity?

I am trying to get duplication for backup on Google Drive. But it looks like it is still using the old client API.

I found some thread that says the new API should be supported, but not very detailed on how to make it work.

I got before compiling and using duplicity 7.0.3, but then got this error:

BackendException: GOOGLE_DRIVE_ACCOUNT_KEY environment variable not set. Please read the manpage to fix.

Has anyone set up duplicity to work with Google Drive and know how to do it?

+4
source share
1 answer

, Google OAuth, Google . , . :

PyDrive

PyDrive - , Duplicity OAuth .

pip install pydrive

, .

API

Google . .

Duplication Project Selection

" API" , . (, .)

API- . . " " " " > " OAuth 2.0". "".

Creation Credentials

, . . .

Credential screen

. . , , .

client_config_backend: settings  
client_config:  
   client_id: <your client ID>.apps.googleusercontent.com
   client_secret: <your client secret>
save_credentials: True
save_credentials_backend: file
save_credentials_file: gdrive.cache
get_refresh_token: True

( Duply , ~/.duply/<server name>/gdrive).

GOOGLE_DRIVE_SETTINGS Duplicity . , :

GOOGLE_DRIVE_SETTINGS=gdrive duplicity <...>

, Duply, export Duply:

export GOOGLE_DRIVE_SETTINGS=gdrive

Duplicity OAuth; ​​ , , , . , , . .cache gdrive.

, Duplicity . !

+9

All Articles