[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Duplicity-talk] duply/duplicity working directory when using a GOOG
From: |
edgar . soldin |
Subject: |
Re: [Duplicity-talk] duply/duplicity working directory when using a GOOGLE_DRIVE_SETTINGS file for gdocs/pydrive |
Date: |
Sat, 17 Oct 2015 23:42:32 +0200 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 |
On 17.10.2015 23:17, Kostas Papadopoulos wrote:
> Hi,
>
> Please note that when configuring duplicity/duply with the
> GOOGLE_DRIVE_SETTINGS env var for gdocs/pydrive settings (having followed the
> directions outlined at
> https://blog.notmyhostna.me/duplicity-with-pydrive-backend-for-google-drive/
> ), it needs to run from the profile directory.
>
> If I invoke duply from any other dir it will fail (see log below when
> invoking from /tmp).
>
> A very minor issue of course, since I can just
> cd ~/.duply/mytest-oauth/ ; ~/bin/duply mytest-oauth full_verify_purge
>
> Is there a way to *instruct duply to invoke duplicity from a certain dir?*
> P
> utting a full dir i.e. export
> GOOGLE_DRIVE_SETTINGS=/root/.duply/mytest-oauth/conf still won't work.
>
> Thank you in advance for your help,
> KP
>
> address@hidden:~/.duply/mytest-oauth# cat ~/.duply/mytest-oauth/conf
> export GOOGLE_DRIVE_SETTINGS=gdrive
> GPG_KEY='xxxxxxxxx'
> GPG_PW='yyyyyyyyyy'
> TARGET='gdocs://address@hidden/duplicity-backup-test'
> SOURCE='/root/docs'
> MAX_AGE=7D
> MAX_FULL_BACKUPS=3
> MAX_FULLS_WITH_INCRS=2
> MAX_FULLBKP_AGE=2D
> DUPL_PARAMS="$DUPL_PARAMS --full-if-older-than $MAX_FULLBKP_AGE "
>
> address@hidden:~/.duply/mytest-oauth# cat gdrive
> client_config_backend: settings
> client_config:
> client_id: qqqqqqqqqqqqqq.apps.googleusercontent.com
> client_secret: wwwwwwwwwwwwwwwwww
> save_credentials: True
> save_credentials_backend: file
> save_credentials_file: gdrive.cache
> get_refresh_token: True
>
>
> address@hidden:/tmp# ~/bin/duply mytest-oauth status
> Start duply v1.10.1, time is 2015-10-17 20:47:32.
> Using profile '/root/.duply/mytest-oauth'.
> Using installed duplicity version 0.7.05, python 2.7.3, gpg 1.4.12 (Home:
> ~/.gnupg), awk 'mawk 1.3.3 Nov 1996, Copyright (C) Michael D. Brennan', grep
> 'grep (GNU grep) 2.12', bash '4.2.37(1)-release (x86_64-pc-linux-gnu)'.
> Autoset found secret key of first GPG_KEY entry 'zzzzzz' for signing.
> Checking TEMP_DIR '/tmp' is a folder (OK)
> Checking TEMP_DIR '/tmp' is writable (OK)
> Test - Encrypt to 'zzzzzz' & Sign with 'zzzzzz' (OK)
> Test - Decrypt (OK)
> Test - Compare (OK)
> Cleanup - Delete '/tmp/duply.4574.1445114852_*'(OK)
>
> --- Start running command STATUS at 20:47:33.006 ---
> Traceback (most recent call last):
> File "/usr/local/bin/duplicity", line 1525, in <module>
> with_tempdir(main)
> File "/usr/local/bin/duplicity", line 1519, in with_tempdir
> fn()
> File "/usr/local/bin/duplicity", line 1357, in main
> action = commandline.ProcessCommandLine(sys.argv[1:])
> File "/usr/local/lib/python2.7/dist-packages/duplicity/commandline.py",
> line 1095, in ProcessCommandLine
> globals.backend = backend.get_backend(args[0])
> File "/usr/local/lib/python2.7/dist-packages/duplicity/backend.py",
> line 223, in get_backend
> obj = get_backend_object(url_string)
> File "/usr/local/lib/python2.7/dist-packages/duplicity/backend.py",
> line 209, in get_backend_object
> return factory(pu)
> File
> "/usr/local/lib/python2.7/dist-packages/duplicity/backends/pydrivebackend.py",
> line 52, in __init__
> gauth.CommandLineAuth()
> File "/usr/local/lib/python2.7/dist-packages/pydrive/auth.py", line 67,
> in _decorated
> self.GetFlow()
> File "/usr/local/lib/python2.7/dist-packages/pydrive/auth.py", line
> 345, in GetFlow
> self.LoadClientConfig()
> File "/usr/local/lib/python2.7/dist-packages/pydrive/auth.py", line
> 294, in LoadClientConfig
> self.LoadClientConfigFile()
> File "/usr/local/lib/python2.7/dist-packages/pydrive/auth.py", line
> 314, in LoadClientConfigFile
> raise InvalidConfigError('Invalid client secrets file %s' % error)
> InvalidConfigError: Invalid client secrets file File not found:
> "client_secrets.json"
>
> 20:47:33.262 Task 'STATUS' failed with exit code '30'.
> --- Finished state FAILED 'code 30' at 20:47:33.262 - Runtime
> 00:00:00.256 ---
> address@hidden:/tmp#
>
did you try
GOOGLE_DRIVE_SETTINGS=/root/.duply/mytest-oauth/gdrive
instead of
GOOGLE_DRIVE_SETTINGS=/root/.duply/mytest-oauth/conf
already ?
..ede/duply.net
- Re: [Duplicity-talk] duply/duplicity working directory when using a GOOGLE_DRIVE_SETTINGS file for gdocs/pydrive,
edgar . soldin <=