-
Notifications
You must be signed in to change notification settings - Fork 883
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change Google Drive backend to Google Drive API + OAuth2 #1347
Comments
Will it work ? |
Yeah, it might be advisable that each installation has their own Google Developer project for quota purposes, but yes -- it will work. |
I agree that the Google Drive backend should be updated to use the Google Drive API with OAuth2. I would also like the scope of the authorization to be limited to the Application Data Folder (see: https://developers.google.com/drive/web/scopes and https://developers.google.com/drive/web/appdata), or at least to allow the user to select that option during the authorization process. My Google Drive setup involves terabytes of data of various kinds, including backups. I do not want to authorize any apps to have full access to the contents of my Google Drive. The Application Data scope seems appropriate because Duplicati 2.0's backups are not usable by applications other than Duplicati 2.0. Another alternative would be the scope "https://www.googleapis.com/auth/drive.file", but it's not clear to me how that scope limits the ability of the app to open files not created by the app. |
Yes, it did happen a few days ago where Google Drive Authentication now fails and they have went to the new V3 libraries and OAuth2.0. |
Is there a way to star an issue on GitHub? My backup started failing since Monday (25.05.2015). Also +1 to what TechGuy2000 said about limiting authorization to Application Data Folder. |
It appears google has undone their removal of basic authentication. Duplicati is now working normally again; since 6/11. |
Indeed it seems to work for me. Although I wouldn't count on Google keeping it working for too long. It's a deprecated API after all. If only I had time I'd gladly contribute myself and implement a new backend. Btw, I would be willing to give a small donation (10-20 EUR) to whoever would add such support. |
I am working on the Google Drive implementation for OAuth, and making some good progress. However, for those currently using the Google Docs backend to store data, they will need to use the full "https://www.googleapis.com/auth/drive". From what I can read about the AppData folder, it prevents users from seeing the contents, which would make it hard to recover the files if Duplicati's OAuth connector goes broken at some point. Also, files stored with AppData will be delete if the user removes the app (de-authorizes it?), which might give a nasty surprise. |
Considering that my current backup is over 30 days old I'd be willing to Perhaps for best user experience it should be possible to specify the type On Mon, Jun 22, 2015, 11:22 Kenneth Skovhede notifications@github.com
|
I think I can just add another login button, and it should work for both access levels. The implementation is now complete, I am running tests for the rest of the day, and if all works, it should be comitted by tonight. |
Not trying to sound ungrateful, love your work, SUPER appreciate it.... but..... any chance of pushing out a preview_2.0.0.87 (or similar) with this fix in it? This is a show stopper on a lot of backups for me personally. |
What MalachiC said. |
Just downloaded latest version and compiled from sources. After reading some code, I've registered on https://duplicati-oauth-handler.appspot.com/ with Google Drive login button and manually entered the following connection URI: googledrive://DuplicatiBackup?authid=my-authid. This didn't work and web GUI crashed with "Error while running DriveD: Backend not supported: googledrive://DuplicatiBackup?authid=my-authid." error. I must be doing something wrong... |
I've copied manually Duplicat.Library.Backend.GoogleDrive.dll and Duplicati.Library.OAuthHelper.dll into my current installation, restarted Duplicati but it still didn't work. |
You also need the dll's from the thirdparty/GoogleAPI folder. Are you on windows? I have only tested on OSX. |
Yes, I am on Windows. Tried with command line util:
|
Copying thirdparty/GoogleAPI next to the Duplicati.CommandLine.exe didn't help. |
Try adding |
Sorry, I was being stupid. I actually ran it in the project folder. Here is the output with
|
Perhaps we can continue this discussion on email rryk.ua [at] gmail.com to avoid spamming all the people who are watching this issue. |
Finally managed to make the latest version work from sources:
Without 1st step, it will complain about missing libraries. Copying thirdparty/GoogleAPIs to deployment folder didn't help. Without 5th step, the web interface won't load. I started the backup and left it run over night. Hopefully it will complete successfully by tomorrow. |
Got an error after stopping after upload and restarting again:
I wonder why did I get OutOfMemoryException. I have 8 GB of memory and just 147 files on the backend. |
Synched to master and all worked. Nevermind. |
This was fixed with fed160f and will be part of the next preview release |
If you want to test the preview that is not yet released for automatic update, you can find it here: |
Currently, it would appear that Duplicati uses the Google DocsList v3 API + Client Login for the Google Docs Backend. These interfaces have been deprecated since April 2012 will go dark in April 2015.
The Google Drive backend should be updated to use the Google Drive API and OAuth2 for authentication.
The Google .NET Client Library can be found here: https://github.com/peleyal/google-api-dotnet-client
The text was updated successfully, but these errors were encountered: