[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: |
Sun, 18 Oct 2015 12:41:14 +0200 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 |
On 18.10.2015 01:51, Kostas Papadopoulos wrote:
> On 10/17/2015 5:42 PM, address@hidden wrote:
>> 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?*
>>>
>>>
>>> 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
>
> Yes (it was my typo obviously, I meant to write gdrive, not conf) ...
>
> *Duplicity will just write the gdrive.cache file in the current working
> directory* (i.e. not in ~/.duply/profile/ dir, but in /tmp in the example
> below and note that I had to manually re-authenticate with OAuth2.0):
>
>
> address@hidden:~/.duply/mytest2-oauth# ~/bin/duply mytest2-oauth status
> Start duply v1.10.1, time is 2015-10-17 23:40:52.
> Using profile '/root/.duply/mytest2-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 'xxxxxxxx' for signing.
> Checking TEMP_DIR '/tmp' is a folder (OK)
> Checking TEMP_DIR '/tmp' is writable (OK)
> Test - Encrypt to 'xxxxxxxx' & Sign with 'xxxxxxxx' (OK)
> Test - Decrypt (OK)
> Test - Compare (OK)
> Cleanup - Delete '/tmp/duply.1934.1445125252_*'(OK)
>
> --- Start running command STATUS at 23:40:52.682 ---
> Local and Remote metadata are synchronized, no sync needed.
> Last full backup date: Sat Oct 17 20:19:20 2015
> Collection Status
> -----------------
> Connecting with backend: BackendWrapper
> Archive dir: /root/.cache/duplicity/duply_mytest2-oauth
>
> Found 0 secondary backup chains.
>
> Found primary backup chain with matching signature chain:
> -------------------------
> Chain start time: Sat Oct 17 20:19:20 2015
> Chain end time: Sat Oct 17 21:18:18 2015
> Number of contained backup sets: 3
> Total number of contained volumes: 3
> Type of backup set: Time: Num volumes:
> Full Sat Oct 17 20:19:20 2015 1
> Incremental Sat Oct 17 20:33:32 2015 1
> Incremental Sat Oct 17 21:18:18 2015 1
> -------------------------
> No orphaned or incomplete backup sets found.
> --- Finished state OK at 23:40:54.405 - Runtime 00:00:01.722 ---
> address@hidden:~/.duply/mytest2-oauth#
>
>
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> address@hidden:~/.duply/mytest2-oauth# cd /tmp
> address@hidden:/tmp# ~/bin/duply mytest2-oauth status
> Start duply v1.10.1, time is 2015-10-17 23:40:58.
> Using profile '/root/.duply/mytest2-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 'xxxxxxxx' for signing.
> Checking TEMP_DIR '/tmp' is a folder (OK)
> Checking TEMP_DIR '/tmp' is writable (OK)
> Test - Encrypt to 'xxxxxxxx' & Sign with 'xxxxxxxx' (OK)
> Test - Decrypt (OK)
> Test - Compare (OK)
> Cleanup - Delete '/tmp/duply.2203.1445125258_*'(OK)
>
> --- Start running command STATUS at 23:40:58.988 ---
> Go to the following link in your browser:
>
>
> https://accounts.google.com/o/oauth2/auth?scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdrive&redirect_uri=...
>
> Enter verification code: xxxxxxxxxxxxxxxxxxxxx
> Authentication successful.
> Local and Remote metadata are synchronized, no sync needed.
> Last full backup date: Sat Oct 17 20:19:20 2015
> Collection Status
> -----------------
> Connecting with backend: BackendWrapper
> Archive dir: /root/.cache/duplicity/duply_mytest2-oauth
>
> Found 0 secondary backup chains.
>
> Found primary backup chain with matching signature chain:
> -------------------------
> Chain start time: Sat Oct 17 20:19:20 2015
> Chain end time: Sat Oct 17 21:18:18 2015
> Number of contained backup sets: 3
> Total number of contained volumes: 3
> Type of backup set: Time: Num volumes:
> Full Sat Oct 17 20:19:20 2015 1
> Incremental Sat Oct 17 20:33:32 2015 1
> Incremental Sat Oct 17 21:18:18 2015 1
> -------------------------
> No orphaned or incomplete backup sets found.
> --- Finished state OK at 23:42:30.979 - Runtime 00:01:31.990 ---
> address@hidden:/tmp# ls -la
> total 156
> drwxrwxrwt 2 root root 4096 Oct 17 23:42 .
> drwxr-xr-x 22 root root 4096 Oct 17 23:34 ..
> -rw------- 1 root root 918 Oct 17 23:42 gdrive.cache
> -rw------- 1 root root 144584 Oct 17 23:39
> google-api-python-client-discovery-doc.cache
> address@hidden:/tmp#
>
>
>
hey Kostas, please stay on the ml.
try setting
save_credentials_file: /some/absolute/path/gdrive.cache
to keep the auth cache somewhere safe/reusable.
to make sure the discovery cache is not left over try to patch your
'duplicity/tempdir.py' like this
http://bazaar.launchpad.net/~ed.so/duplicity/tempfile.tempdir/revision/1136
does that work for you? ..ede