Skip to main content

Thread: Duplicity won't use PASSPHRASE env variable


hello,

i'm struggling set of scripts i've long used remote ssh-based backups using duplicity on 11.10. fresh machine installation, may not directly related 11.10, can't figure out. i'm seeing following error when try run backup via /etc/crontab:

code:
/usr/lib/python2.7/getpass.py:83: getpasswarning: can not control echo on terminal.    passwd = fallback_getpass(prompt, stream)  warning: password input may echoed.  gnupg passphrase signing key: traceback (most recent call last):    file "/usr/bin/duplicity", line 1359, in <module>      with_tempdir(main)    file "/usr/bin/duplicity", line 1342, in with_tempdir      fn()    file "/usr/bin/duplicity", line 1297, in main      globals.gpg_profile.signing_passphrase = get_passphrase(1, action, true)    file "/usr/bin/duplicity", line 154, in get_passphrase      pass1 = getpass.getpass(_("gnupg passphrase signing key:")+" ")    file "/usr/lib/python2.7/getpass.py", line 83, in unix_getpass      passwd = fallback_getpass(prompt, stream)    file "/usr/lib/python2.7/getpass.py", line 118, in fallback_getpass      return _raw_input(prompt, stream)    file "/usr/lib/python2.7/getpass.py", line 135, in _raw_input      raise eoferror  eoferror
this trying interactive password retrieve, won't work within crontab. however, script should passing in passphrase via environment:

code:
#!/bin/bash  export passphrase=xxxxxxxxxxxxxxxxxxxxxxxxxx  export home=/root    duplicity --log-file /var/log/duplicity.log --full-if-older-than 1m --include-globbing-filelist /root/bin/filelist.bkp --sign-key xxxxxxxx --ssh-options "-oprotocol=2 -oidentityfile=/root/bin/duplicity.key" / scp://xxxxx@xxxxx.org/backups/primary >> /var/log/duplicitybackup.log 2>&1    unset passphrase    echo "nightly backup successful: $(date)" >> /var/log/duplicitybackup.log  echo "nightly backup successful: $(date)" | mail -s "nightly backup successful: $(date)" xxxxx
i can't seem figure out why no longer working , why duplicity won't recognize passphrase environment variable. can offer help?

thanks,
craig

does have ideas me try or places can look?

again,
craig


Forum The Ubuntu Forum Community Ubuntu Official Flavours Support General Help [ubuntu] Duplicity won't use PASSPHRASE env variable


Ubuntu

Comments

Popular posts from this blog

How to set the order of FAQs instead of alphabetical

Thread: Get UK Keyboard working

how do I change the e-mail address for my merchant account