[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Duplicity-talk] pydrive backend: how to use storage of a user accou
From: |
Rupert Levene |
Subject: |
Re: [Duplicity-talk] pydrive backend: how to use storage of a user account instead of a service account? |
Date: |
Thu, 28 May 2015 16:15:40 +0100 |
A patch is attached for a new backend called pydrive2 which uses user
storage, like the (now defunct) gdocs backend and unlike the pydrive
backend.
To use it:
(1) patch -o pydrive2backend.py pydrivebackend.py < pydrive2.patch
(2) follow instructions at
http://pythonhosted.org/PyDrive/quickstart.html to generate a
client_secrets.json file and save it to a local directory
(3) set the environment variable GOOGLE_DRIVE_AUTH_DIRECTORY to this directory
(4) use pydrive2:// instead of gdocs:// (and remove any password) when
calling duplicity
(5) during the first duplicity run, you will be asked to authorise by
pasting a url into your browser; this authorisation should be
remembered on subsequent runs
Rupert
On 13 February 2015 at 12:06, Rupert Levene <address@hidden> wrote:
> Hi,
>
> I have successfully made and verified a backup using the pydrive
> backend written by Yigal Asnis. As per the man page, I made a service
> account in the Google developers console; I did this while logged into
> my user account.
>
> My problem is that I want the backup to go into my user account's
> Google drive space, but instead it ends up in the service account's
> Google drive space. I know this because the files don't show up in my
> user account's Google drive, but they do show up in the service
> account's drive (I can check this with API calls).
>
> This has two drawbacks:
>
> (1) I would like to use the unlimited quota in my user account, but
> the quota in the service account is restricted to 15 GB; and
>
> (2) as far as I know the service account has no password, so I can't
> see the backup through the usual Google drive web interface, android
> apps etc.
>
> Could the pydrive backend be modified to allow backups to the drive
> storage of a user account rather than just a service account? I guess
> the authentication process may be a bit more involved, but I believe
> it can be done.
>
> For example, gauth could be made in the following way, without using a
> service account at all:
>
> gauth=GoogleAuth()
> if not gauth.LoadCredentialsFile("/path/to/auth.txt") :
> gauth.CommandLineAuth()
> gauth.SaveCredentialsFile("/path/to/auth.txt")
>
> Rupert
pydrive2.patch
Description: Text Data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Duplicity-talk] pydrive backend: how to use storage of a user account instead of a service account?,
Rupert Levene <=