Can't run duplicity cleanup with GPG error

Asked by Chaser-andrey

I can't run duplicity cleanup with GPG error
I try run:
LANG=C duplicity cleanup file:///mnt/backup/home/

and I get this output:

Import of duplicity.backends.u1backend Failed: No module named httplib2
Synchronizing remote metadata to local cache...
GnuPG passphrase:
Copying duplicity-new-signatures.20130109T012002Z.to.20130109T043002Z.sigtar.gpg to local cache.
GPGError: GPG Failed, see log below:
===== Begin GnuPG log =====
gpg: encrypted with 4096-bit ELG key, ID XXXXXX, created 2012-10-18
"me <me@mymail>"
gpg: block_filter 0x2242630: read error (size=8882,a->size=8882)
gpg: unexpected EOF in bz2lib
gpg: block_filter 0x223f350: read error (size=15834,a->size=15834)
gpg: mdc_packet with invalid encoding
gpg: decryption failed: Invalid packet
gpg: block_filter: pending bytes!
gpg: block_filter: pending bytes!
===== End GnuPG log =====

Question information

Language:
English Edit question
Status:
Solved
For:
Duplicity Edit question
Assignee:
No assignee Edit question
Solved by:
Chaser-andrey
Solved:
Last query:
Last reply:
Revision history for this message
Kenneth Loafman (kenneth-loafman) said :
#1

Please supply the full output from duplicity when running with -v9.

What distro are you running?

...Thanks,
...Ken

On Thu, Jan 10, 2013 at 5:21 PM, Chaser-andrey <
<email address hidden>> wrote:

> New question #218882 on Duplicity:
> https://answers.launchpad.net/duplicity/+question/218882
>
> I can't run duplicity cleanup with GPG error
> I try run:
> LANG=C duplicity cleanup file:///mnt/backup/home/
>
> and I get this output:
>
> Import of duplicity.backends.u1backend Failed: No module named httplib2
> Synchronizing remote metadata to local cache...
> GnuPG passphrase:
> Copying
> duplicity-new-signatures.20130109T012002Z.to.20130109T043002Z.sigtar.gpg to
> local cache.
> GPGError: GPG Failed, see log below:
> ===== Begin GnuPG log =====
> gpg: encrypted with 4096-bit ELG key, ID XXXXXX, created 2012-10-18
> "me <me@mymail>"
> gpg: block_filter 0x2242630: read error (size=8882,a->size=8882)
> gpg: unexpected EOF in bz2lib
> gpg: block_filter 0x223f350: read error (size=15834,a->size=15834)
> gpg: mdc_packet with invalid encoding
> gpg: decryption failed: Invalid packet
> gpg: block_filter: pending bytes!
> gpg: block_filter: pending bytes!
> ===== End GnuPG log =====
>
> --
> You received this question notification because you are a member of
> duplicity-team, which is an answer contact for Duplicity.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~duplicity-team
> Post to : <email address hidden>
> Unsubscribe : https://launchpad.net/~duplicity-team
> More help : https://help.launchpad.net/ListHelp
>

Revision history for this message
edso (ed.so) said :
#2

seems like you signature is corrupted. run with maximum verbosity. see which file gpg chokes on. then

a) download it manually
b) try to decrypt it manually like explained here https://live.gnome.org/DejaDup/Help/Restore/WorstCase#Restoring_by_Hand

if gpg chokes again, your backup is corrupt and pretty much wasted.

also it seems that gpg thinks you bzipped you encrypted files. did you? do/did you use the --gpg-options switch?

..ede/duply.net

Revision history for this message
Chaser-andrey (chaser-andrey) said :
#3

Distro: Gentoo Linux x86_64
Detailed output:

LANG=C duplicity -v9 cleanup file:///mnt/backup/home/
Using archive dir: /home/chaser/.cache/duplicity/8c7f80e9d2ce9e7f681de32babdd8c42
Using backup name: 8c7f80e9d2ce9e7f681de32babdd8c42
Import of duplicity.backends.imapbackend Succeeded
Import of duplicity.backends.u1backend Failed: No module named httplib2
Import of duplicity.backends.gdocsbackend Succeeded
Import of duplicity.backends.localbackend Succeeded
Import of duplicity.backends.ftpsbackend Succeeded
Import of duplicity.backends.sshbackend Succeeded
Import of duplicity.backends.webdavbackend Succeeded
Import of duplicity.backends.tahoebackend Succeeded
Import of duplicity.backends.hsibackend Succeeded
Import of duplicity.backends.ftpbackend Succeeded
Import of duplicity.backends.botobackend Succeeded
Import of duplicity.backends.rsyncbackend Succeeded
Import of duplicity.backends.cloudfilesbackend Succeeded
Main action: cleanup
================================================================================
duplicity 0.6.20 (October 28, 2012)
Args: /usr/bin/duplicity -v9 cleanup file:///mnt/backup/home/
Linux andromeda 3.7.1-pf #1 SMP Sun Dec 23 13:51:58 EET 2012 x86_64 AMD Phenom(tm) II X4 965 Processor
/usr/bin/python2.7 2.7.3 (default, Sep 24 2012, 13:37:21)
[GCC 4.7.1]
================================================================================
Synchronizing remote metadata to local cache...
PASSPHRASE variable not set, asking user.
GnuPG passphrase:
Copying duplicity-new-signatures.20130109T012002Z.to.20130109T043002Z.sigtar.gpg to local cache.
Using temporary directory /tmp/duplicity-mzm8Ow-tempdir
Registering (mktemp) temporary file /tmp/duplicity-mzm8Ow-tempdir/mktemp-eBki8M-1
Registering (mktemp) temporary file /tmp/duplicity-mzm8Ow-tempdir/mktemp-OOcxv2-2
Removing still remembered temporary file /tmp/duplicity-mzm8Ow-tempdir/mktemp-OOcxv2-2
Removing still remembered temporary file /tmp/duplicity-mzm8Ow-tempdir/mktemp-eBki8M-1
GPG error detail: Traceback (most recent call last):
  File "/usr/bin/duplicity-2.7", line 1403, in <module>
    with_tempdir(main)
  File "/usr/bin/duplicity-2.7", line 1396, in with_tempdir
    fn()
  File "/usr/bin/duplicity-2.7", line 1272, in main
    sync_archive(decrypt)
  File "/usr/bin/duplicity-2.7", line 1072, in sync_archive
    copy_to_local(fn)
  File "/usr/bin/duplicity-2.7", line 1019, in copy_to_local
    gpg.GzipWriteFile(src_iter, tdp.name, size=sys.maxint)
  File "/usr/lib64/python2.7/site-packages/duplicity/gpg.py", line 375, in GzipWriteFile
    new_block = block_iter.next(min(128*1024, bytes_to_go))
  File "/usr/bin/duplicity-2.7", line 1002, in next
    self.fileobj.close()
  File "/usr/lib64/python2.7/site-packages/duplicity/dup_temp.py", line 225, in close
    assert not self.fileobj.close()
  File "/usr/lib64/python2.7/site-packages/duplicity/gpg.py", line 242, in close
    self.gpg_failed()
  File "/usr/lib64/python2.7/site-packages/duplicity/gpg.py", line 209, in gpg_failed
    raise GPGError, msg
GPGError: GPG Failed, see log below:
===== Begin GnuPG log =====
gpg: encrypted with 4096-bit ELG key, ID XXXXXXXX, created 2012-10-18
"me <me@mymail>"
gpg: block_filter 0x209b630: read error (size=8882,a->size=8882)
gpg: unexpected EOF in bz2lib
gpg: block_filter 0x2098350: read error (size=15834,a->size=15834)
gpg: mdc_packet with invalid encoding
gpg: decryption failed: Invalid packet
gpg: block_filter: pending bytes!
gpg: block_filter: pending bytes!
===== End GnuPG log =====

GPGError: GPG Failed, see log below:
===== Begin GnuPG log =====
gpg: encrypted with 4096-bit ELG key, ID XXXXXXXX, created 2012-10-18
"me <me@mymail>"
gpg: block_filter 0x209b630: read error (size=8882,a->size=8882)
gpg: unexpected EOF in bz2lib
gpg: block_filter 0x2098350: read error (size=15834,a->size=15834)
gpg: mdc_packet with invalid encoding
gpg: decryption failed: Invalid packet
gpg: block_filter: pending bytes!
gpg: block_filter: pending bytes!
===== End GnuPG log =====

Revision history for this message
Chaser-andrey (chaser-andrey) said :
#4

hmm... it's really corrupted

 LANG=C gpg --output /tmp/duplicity-new-signatures.20130109T012002Z.to.20130109T043002Z.sigtar --decrypt /mnt/backup/home/duplicity-new-signatures.20130109T012002Z.to.20130109T043002Z.sigtar.gpg

You need a passphrase to unlock the secret key for
user: "me <me@mymail>"
4096-bit ELG key, ID XXXXXXXX, created 2012-10-18 (main key ID XXXXXXXX)

gpg: encrypted with 4096-bit ELG key, ID XXXXXXXX, created 2012-10-18
      " "me <me@mymail>"

gpg: block_filter 0x11a77f0: read error (size=8882,a->size=8882)
gpg: unexpected EOF in bz2lib
gpg: block_filter 0x119bd90: read error (size=15834,a->size=15834)
gpg: mdc_packet with invalid encoding
gpg: decryption failed: Invalid packet
gpg: block_filter: pending bytes!
gpg: block_filter: pending bytes!

====================
> also it seems that gpg thinks you bzipped you encrypted files. did you? do/did you use the --gpg-options switch?
yes, I'm using option --gpg-options='--compress-algo=bzip2 --bzip2-compress-level=9'

When I make backup - how I can verify that all data have been correctly backuped and uploaded? "duplicity verify"?

Revision history for this message
edso (ed.so) said :
#5

On 12.01.2013 21:11, Chaser-andrey wrote:
> Question #218882 on Duplicity changed:
> https://answers.launchpad.net/duplicity/+question/218882
>
> Chaser-andrey gave more information on the question:
> hmm... it's really corrupted
>
SNIP
>
> When I make backup - how I can verify that all data have been correctly
> backuped and uploaded? "duplicity verify"?
>

yes .. ede/duply.net

Revision history for this message
Chaser-andrey (chaser-andrey) said :
#6

tnx