Comment 1 for bug 758077

Revision history for this message
Kenneth Loafman (kenneth-loafman) wrote : Re: [Bug 758077] [NEW] non-interactive duplicity job using GPG keys crashes

Duplicity requires a password-less key pair for backup. It needs to decrypt
the manifest to compare the local cache against the remote store. This is a
known limitation.

...Ken

On Mon, Apr 11, 2011 at 4:00 PM, Joshua Jensen <email address hidden>wrote:

> Public bug reported:
>
> I'm running a duplicity nightly backup from cron that is having
> problems. I'm using a GPG keypair. The public key is used to encrypt
> without a PASSPHRASE or interaction, and the private key to decrypt and
> restore interactively with a PASSPHRASE later if necessary.
>
> This works from my command prompt *where I am not prompted for anything
> when running this command*.
>
> However, from cron, this fails with getpass.py being uncomfortable about
> not being able to control echo on the terminal:
>
> ARGS="--asynchronous-upload --tempdir /tmp --no-print-statistics \
> --include /data/backups/bin --encrypt-key CE71E9DC \
> --exclude-globbing-filelist $DEST/bin/rdiff-backup-excludes \
> -v2 --volsize 100 $@"
>
> duplicity $ARGS / file://$DESTDIR
>
>
> /usr/lib64/python2.6/getpass.py:83: GetPassWarning: Can not control echo on
> the terminal.
> passwd = fallback_getpass(prompt, stream)
> Warning: Password input may be echoed.
> GnuPG passphrase: Traceback (most recent call last):
> File "/usr/bin/duplicity", line 1245, in <module>
> with_tempdir(main)
> File "/usr/bin/duplicity", line 1238, in with_tempdir
> fn()
> File "/usr/bin/duplicity", line 1139, in main
> sync_archive()
> File "/usr/bin/duplicity", line 949, in sync_archive
> globals.gpg_profile.passphrase = get_passphrase(1, "sync")
> File "/usr/bin/duplicity", line 129, in get_passphrase
> pass1 = getpass.getpass("GnuPG passphrase: ")
> File "/usr/lib64/python2.6/getpass.py", line 83, in unix_getpass
> passwd = fallback_getpass(prompt, stream)
> File "/usr/lib64/python2.6/getpass.py", line 118, in fallback_getpass
> return _raw_input(prompt, stream)
> File "/usr/lib64/python2.6/getpass.py", line 135, in _raw_input
> raise EOFError
> EOFError
>
> duplicity version 0.6.11, Python 2.6.5, RHEL 6.0 x86_64, target
> filesystem is an NFS mount
>
>
> Surely non-interactive duplicity commands shouldn't fail because
> duplicity can't go interactive!!
>
> ** Affects: duplicity
> Importance: Undecided
> Status: New
>
> --
> You received this bug notification because you are subscribed to
> Duplicity.
> https://bugs.launchpad.net/bugs/758077
>
> Title:
> non-interactive duplicity job using GPG keys crashes
>
> Status in Duplicity - Bandwidth Efficient Encrypted Backup:
> New
>
> Bug description:
> I'm running a duplicity nightly backup from cron that is having
> problems. I'm using a GPG keypair. The public key is used to encrypt
> without a PASSPHRASE or interaction, and the private key to decrypt
> and restore interactively with a PASSPHRASE later if necessary.
>
> This works from my command prompt *where I am not prompted for
> anything when running this command*.
>
> However, from cron, this fails with getpass.py being uncomfortable
> about not being able to control echo on the terminal:
>
> ARGS="--asynchronous-upload --tempdir /tmp --no-print-statistics \
> --include /data/backups/bin --encrypt-key CE71E9DC \
> --exclude-globbing-filelist $DEST/bin/rdiff-backup-excludes \
> -v2 --volsize 100 $@"
>
> duplicity $ARGS / file://$DESTDIR
>
>
> /usr/lib64/python2.6/getpass.py:83: GetPassWarning: Can not control echo
> on the terminal.
> passwd = fallback_getpass(prompt, stream)
> Warning: Password input may be echoed.
> GnuPG passphrase: Traceback (most recent call last):
> File "/usr/bin/duplicity", line 1245, in <module>
> with_tempdir(main)
> File "/usr/bin/duplicity", line 1238, in with_tempdir
> fn()
> File "/usr/bin/duplicity", line 1139, in main
> sync_archive()
> File "/usr/bin/duplicity", line 949, in sync_archive
> globals.gpg_profile.passphrase = get_passphrase(1, "sync")
> File "/usr/bin/duplicity", line 129, in get_passphrase
> pass1 = getpass.getpass("GnuPG passphrase: ")
> File "/usr/lib64/python2.6/getpass.py", line 83, in unix_getpass
> passwd = fallback_getpass(prompt, stream)
> File "/usr/lib64/python2.6/getpass.py", line 118, in fallback_getpass
> return _raw_input(prompt, stream)
> File "/usr/lib64/python2.6/getpass.py", line 135, in _raw_input
> raise EOFError
> EOFError
>
> duplicity version 0.6.11, Python 2.6.5, RHEL 6.0 x86_64, target
> filesystem is an NFS mount
>
>
>
> Surely non-interactive duplicity commands shouldn't fail because duplicity
> can't go interactive!!
>