duplicity-talk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Duplicity-talk] how to do the oauth2 interactive authentication whe


From: Andreas Schuldei
Subject: Re: [Duplicity-talk] how to do the oauth2 interactive authentication when run from cron (backup to google drive)?
Date: Fri, 04 May 2018 07:19:00 +0000

actually i do get the error before my traceback: 
/usr/local/lib/python2.7/dist-packages/oauth2client/_helpers.py:255: UserWarning: Cannot access <filename to cache credentials>: No such file or directory

could it be that this is just a very unfortunate choice of filename and the > and < are interpreted? (I am aware the shell should not be involved at this point, but those are still special chars, even vor python.)  The $HOME and user (that the process runs as, root) are all correct.

On Thu, May 3, 2018 at 9:41 AM Andreas Schuldei <address@hidden> wrote:
apt-cache policy duplicity 
duplicity:
  Installed: 0.7.17-0ubuntu0ppa1353~ubuntu18.04.1
  Candidate: 0.7.17-0ubuntu0ppa1353~ubuntu18.04.1
  Version table:
 *** 0.7.17-0ubuntu0ppa1353~ubuntu18.04.1 100
        100 /var/lib/dpkg/status
     0.7.11-1 500
        500 http://ftp.debian.org/debian stretch/main armel Packages

i build that package from source, using (and slightly adjusting) the ubuntu package, so it builds on debian.

cat /etc/debian_version 
9.0


you say it creates a .file in $HOME. actually there is a file with the funny name "<filename to cache credentials>" ("<" and ">" as part of the filename. there is no ".file", though. the backup runs as user root, though. I added further debugging and copied the funny file (which does contain google authentication credentials) to ".file". lets see if that works tomorrow night when the backup is supposed to run.


On Wed, May 2, 2018 at 9:47 PM Kenneth Loafman <address@hidden> wrote:
Which OS/version?  Which duplicity/version?  What is your command line?

The backend will normally save a .file in the user's home directory.  If you do "sudo duplicity ...", that will use your home dir, not root's.  To fix this, do "$ sudo -i duplicity ..." to login as root and use root's home dir.  Or, you can find the .file and copy it to /root.  You may need to chown it to root.

Hope that helps!

...Ken


On Wed, May 2, 2018 at 10:03 AM, Andreas Schuldei via Duplicity-talk <address@hidden> wrote:
i did a test run for my backup script from the command line (as root) and did the offline access type authentication where you paste a code from the webbrowser to the commandline. That backup went fine.

now from cron the script runs as root, too, and demands the same kind of authentication again. it does not so that when running from the command line. 

how do i solve this?

kind regards,

Andreas

_______________________________________________
Duplicity-talk mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/duplicity-talk



reply via email to

[Prev in Thread] Current Thread [Next in Thread]