10

I tried to search to see if Google Drive is supported the same way Ubuntu One is supported for Deja-Dup but I haven't seen anything concrete. I don't want to store a local copy of the backed up files, but rather put it directly to the Google Drive account and prevent it from being sync'd.

1
  • Gdrive doesn't have official client for Linux, so I doubt a tool like that exists
    – MrVaykadji
    Mar 19, 2014 at 18:12

3 Answers 3

8

You still cannot do so using deja-dup but fortunately it doesn't matter as you can use duplicity to achieve the same purpose. Deja-dup is the gui front-end for duplicity. You can use duplicity directly from the command line and surprisingly it is simpler than using the gui of deja-dup!

You need to install the package python-gdata first as it is not part of the base system.

sudo apt-get install python-gdata

After that you can use duplicity to put a local folder directly to google drive by issuing the following command:

duplicity localfolder gdocs://[email protected]/remotefolder

or

duplicity localfolder gdocs://username:[email protected]/remotefolder

In the second case it obviously won't ask for your gmail's password(but would still ask for the encryption passphrase).

Command to restore:

duplicity restore gdocs://[email protected]/remotefolder localfolder

In all the above cases localfolder is a folder in your home directory and you are running the commands from your home directory.

Two minor caveats. Firstly, while restoring you have to ensure that localfolder doesn't exist otherwise duplicity will abort saying localfolder already exists. Secondly, I have tested the above in ubuntu 14.04 so can't comment about the other versions.

2
  • This was hugely promising, but when trying it out, I get BackendException: Error while authenticating client: Server responded to ClientLogin request: 404, https://developers.google.com/accounts/docs/AuthForInstalledApps error, pointing out to a complaint of old authentication method. Is there any updated procedure on how to use duplicity with OAuth 2.0?
    – Huge
    Feb 19, 2016 at 21:20
  • If you install the command line google "drive" software, you execute a command "drive push <files>" to upload your files without a password. So you should be able to do that in your shell file. Aug 21, 2017 at 7:20
1

The only solution I have come up with is to back up to a local drive using Deja Dup, then zip the folder and upload to Google Drive.

I am hoping to find a way to create a folder with Google Cloud or Google Drive and achieve incremental backups automatically.

Currently I get the error:

Cannot resolve hostname when using //drive.google.com/
1

This was reported in this bug, for which a fix has been committed. The change should be included in version 32.

Update: The fix was reverted due to issues with the duplicity backend. However, duplicity can still do this. There is a question on SO about how to get it working with Google's OAuth, at least with the Duply frontend as of December 2015. This involves installing pydrive, setting up access on your Google account, and creating a settings file for duplicity.

Related question with other options: Backup with duplicity on Google Cloud Storage

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .