Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've tried a number of obvious commands as detailed in Duplicity Man page to do this but doesn't seem to work.

Scenario

I'm SSH'ing to a machine, then running Duplicity; below is the CMD, of sorts:-

ssh -i /keys/key.pem -o StrictHostKeyChecking=no user@ipAddress "sudo duplicity --s3-european-buckets --s3-use-new-style /local/dir/stuff s3+http://bucket/dir/"

Problem is, it's always asking for a passphrase, and I want to run this as an automated process without CLi user replies. The man page only precise reference is to the environment variable PASSPHRASE, but makes little mention (with encrypt-key or sign-key which seem different) how this can be set.

NOTE: It's asking for GnuPG passphrase:

Any help much appreciated.

share|improve this question
    
Which passphrase is it asking for? –  womble Aug 6 '12 at 10:26
    
Added, it's asking for GnuPG –  waxical Aug 6 '12 at 10:40
    
Why is it asking for a GnuPG passphrase? It should only need that to decrypt. –  womble Aug 6 '12 at 10:42
    
@womble duplicity needs to decrypt previous backups in order to do incremental backups –  ptman Aug 6 '12 at 10:45
    
@ptman: It didn't when I used to use it. If it does now, that's a pretty serious regression in, security, useability, and resource consumption. –  womble Aug 6 '12 at 10:47

2 Answers 2

up vote 2 down vote accepted

you can pass environment variables using env(1):

env PASSPHRASE=.... duplicity ...
share|improve this answer
    
Yes, I cite that in the post. How to set it is the question. –  waxical Aug 6 '12 at 10:49
    
I see a link added now. Will try... edit/ BINGO! –  waxical Aug 6 '12 at 10:50

you are using sudo, so, you need to change options in /etc/sudoers file Google Here

share|improve this answer
    
Are you sure, this is GnuPG passphrase yeah? Not an access password for sudo'ing. –  waxical Aug 6 '12 at 10:39

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.