OverflowError while restoring a backup (ecrypted/local repo) (lp:#1256897)

[Original report](https://bugs.launchpad.net/bugs/1256897) created by **Socket (nick-regist)**
```
Duplicity version: 0.6.22 (from tar.gz downloaded
http://duplicity.nongnu.org/ )
Python version: 2.7.3
OS Distro: Kali Linux 1.0.5 32-Bit
Type of target filesystem: Win 7 NTFS (actually I'm doing the restore via a
VM with both repository and destionatio are mounted as shared folders--
vboxsf. I preferred this setup because using cygwin I had other exceptions
related to fork() and such)
Description: While restoring a backup from a local repository, encrypted
with gnupg, i got "OverflowError: Python int too large to convert to C
long".

Being this information quite urgent I'm asking whether there is a "manual"
way to retrieve whatever contained in the backup.

root@Kali:~# /usr/local/bin/duplicity -v9 file:///root/bkp/BKP_Reply/ dest/
Using archive dir: /root/.cache/duplicity/fdd725b8342168a02dea8939d396fc90
Using backup name: fdd725b8342168a02dea8939d396fc90
Import of duplicity.backends.sshbackend Succeeded
Import of duplicity.backends.ftpbackend Succeeded
Import of duplicity.backends.webdavbackend Succeeded
Import of duplicity.backends.megabackend Succeeded
Import of duplicity.backends.ftpsbackend Succeeded
Import of duplicity.backends.botobackend Succeeded
Import of duplicity.backends.u1backend Succeeded
Import of duplicity.backends.rsyncbackend Succeeded
Import of duplicity.backends.cloudfilesbackend Succeeded
Import of duplicity.backends.hsibackend Succeeded
Import of duplicity.backends.localbackend Succeeded
Import of duplicity.backends.imapbackend Succeeded
Import of duplicity.backends.gdocsbackend Succeeded
Import of duplicity.backends.swiftbackend Succeeded
Import of duplicity.backends.dpbxbackend Failed: No module named dropbox
Import of duplicity.backends.tahoebackend Succeeded
Main action: restore
================================================================================
duplicity 0.6.22 (August 22, 2013)
Args: /usr/local/bin/duplicity -v9 file:///root/bkp/BKP_Reply/ dest/
Linux Kali 3.7-trunk-686-pae #1 SMP Debian 3.7.2-0+kali8 i686
/usr/bin/python 2.7.3 (default, Jan  2 2013, 16:53:07)
[GCC 4.7.2]
================================================================================
Using temporary directory /tmp/duplicity-L0anjV-tempdir
Registering (mkstemp) temporary file /tmp/duplicity-L0anjV-tempdir/mkstemp-
cSTvG5-1
Temp has 8973217792 available, backup will use approx 34078720.
Local and Remote metadata are synchronized, no sync needed.
18 files exist on backend
6 files exist in cache
Extracting backup chains from list of files: ['duplicity-full-
signatures.20131111T011109Z.sigtar.gpg', 'duplicity-
full.20131111T011109Z.manifest.gpg', 'duplicity-
full.20131111T011109Z.vol1.difftar.gpg', 'duplicity-
full.20131111T011109Z.vol2.difftar.gpg', 'duplicity-
full.20131111T011109Z.vol3.difftar.gpg', 'duplicity-
full.20131111T011109Z.vol4.difftar.gpg', 'duplicity-
full.20131111T011109Z.vol5.difftar.gpg', 'duplicity-
full.20131111T011109Z.vol6.difftar.gpg', 'duplicity-
full.20131111T011109Z.vol7.difftar.gpg', 'duplicity-
full.20131111T011109Z.vol8.difftar.gpg', 'duplicity-
inc.20131111T011109Z.to.20131127T214428Z.manifest.gpg', 'duplicity-
inc.20131111T011109Z.to.20131127T214428Z.vol1.difftar.gpg', 'duplicity-
inc.20131111T011109Z.to.20131127T214428Z.vol2.difftar.gpg', 'duplicity-
inc.20131111T011109Z.to.20131127T214428Z.vol3.difftar.gpg', 'duplicity-
inc.20131127T214428Z.to.20131128T001021Z.manifest.gpg', 'duplicity-
inc.20131127T214428Z.to.20131128T001021Z.vol1.difftar.gpg', 'duplicity-new-
signatures.20131111T011109Z.to.20131127T214428Z.sigtar.gpg', 'duplicity-
new-signatures.20131127T214428Z.to.20131128T001021Z.sigtar.gpg']
File duplicity-full-signatures.20131111T011109Z.sigtar.gpg is not part of a
known set; creating new set
Ignoring file (rejected by backup set) 'duplicity-full-
signatures.20131111T011109Z.sigtar.gpg'
File duplicity-full.20131111T011109Z.manifest.gpg is not part of a known
set; creating new set
File duplicity-full.20131111T011109Z.vol1.difftar.gpg is part of known set
File duplicity-full.20131111T011109Z.vol2.difftar.gpg is part of known set
File duplicity-full.20131111T011109Z.vol3.difftar.gpg is part of known set
File duplicity-full.20131111T011109Z.vol4.difftar.gpg is part of known set
File duplicity-full.20131111T011109Z.vol5.difftar.gpg is part of known set
File duplicity-full.20131111T011109Z.vol6.difftar.gpg is part of known set
File duplicity-full.20131111T011109Z.vol7.difftar.gpg is part of known set
File duplicity-full.20131111T011109Z.vol8.difftar.gpg is part of known set
File duplicity-inc.20131111T011109Z.to.20131127T214428Z.manifest.gpg is not
part of a known set; creating new set
File duplicity-inc.20131111T011109Z.to.20131127T214428Z.vol1.difftar.gpg is
part of known set
File duplicity-inc.20131111T011109Z.to.20131127T214428Z.vol2.difftar.gpg is
part of known set
File duplicity-inc.20131111T011109Z.to.20131127T214428Z.vol3.difftar.gpg is
part of known set
File duplicity-inc.20131127T214428Z.to.20131128T001021Z.manifest.gpg is not
part of a known set; creating new set
File duplicity-inc.20131127T214428Z.to.20131128T001021Z.vol1.difftar.gpg is
part of known set
File duplicity-new-
signatures.20131111T011109Z.to.20131127T214428Z.sigtar.gpg is not part of a
known set; creating new set
Ignoring file (rejected by backup set) 'duplicity-new-
signatures.20131111T011109Z.to.20131127T214428Z.sigtar.gpg'
File duplicity-new-
signatures.20131127T214428Z.to.20131128T001021Z.sigtar.gpg is not part of a
known set; creating new set
Ignoring file (rejected by backup set) 'duplicity-new-
signatures.20131127T214428Z.to.20131128T001021Z.sigtar.gpg'
Found backup chain [Mon Nov 11 02:11:09 2013]-[Mon Nov 11 02:11:09 2013]
Added incremental Backupset (start_time: Mon Nov 11 02:11:09 2013 /
end_time: Wed Nov 27 22:44:28 2013)
Added set Wed Nov 27 22:44:28 2013 to pre-existing chain [Mon Nov 11
02:11:09 2013]-[Wed Nov 27 22:44:28 2013]
Added incremental Backupset (start_time: Wed Nov 27 22:44:28 2013 /
end_time: Thu Nov 28 01:10:21 2013)
Added set Thu Nov 28 01:10:21 2013 to pre-existing chain [Mon Nov 11
02:11:09 2013]-[Thu Nov 28 01:10:21 2013]
Last full backup date: Mon Nov 11 02:11:09 2013
Collection Status
-----------------
Connecting with backend: LocalBackend
Archive dir: /root/.cache/duplicity/fdd725b8342168a02dea8939d396fc90

Found 0 secondary backup chains.

Found primary backup chain with matching signature chain:
-------------------------
Chain start time: Mon Nov 11 02:11:09 2013
Chain end time: Thu Nov 28 01:10:21 2013
Number of contained backup sets: 3
Total number of contained volumes: 12
 Type of backup set:                            Time:      Num volumes:
                Full         Mon Nov 11 02:11:09 2013                 8
         Incremental         Wed Nov 27 22:44:28 2013                 3
         Incremental         Thu Nov 28 01:10:21 2013                 1
-------------------------
No orphaned or incomplete backup sets found.
PASSPHRASE variable not set, asking user.
GnuPG passphrase:
Registering (mktemp) temporary file /tmp/duplicity-L0anjV-tempdir/mktemp-
lABFYV-2
Registering (mktemp) temporary file /tmp/duplicity-L0anjV-tempdir/mktemp-
CipsuY-3
Registering (mktemp) temporary file /tmp/duplicity-L0anjV-tempdir/mktemp-
pGWXBO-4
Writing Desktop of type dir
Making directory dest/Desktop

[...snip...]

Deleting /tmp/duplicity-L0anjV-tempdir/mktemp-lABFYV-2
Forgetting temporary file /tmp/duplicity-L0anjV-tempdir/mktemp-lABFYV-2
Processed volume 1 of 12
Registering (mktemp) temporary file /tmp/duplicity-L0anjV-
tempdir/mktemp-k6uzD3-5
Deleting /tmp/duplicity-L0anjV-tempdir/mktemp-k6uzD3-5
Forgetting temporary file /tmp/duplicity-L0anjV-tempdir/mktemp-k6uzD3-5
Processed volume 2 of 12
Registering (mktemp) temporary file /tmp/duplicity-L0anjV-tempdir/mktemp-
RuQ4T8-6
Deleting /tmp/duplicity-L0anjV-tempdir/mktemp-RuQ4T8-6
Forgetting temporary file /tmp/duplicity-L0anjV-tempdir/mktemp-RuQ4T8-6
Processed volume 3 of 12
Registering (mktemp) temporary file /tmp/duplicity-L0anjV-
tempdir/mktemp-64oBHh-7
Deleting /tmp/duplicity-L0anjV-tempdir/mktemp-64oBHh-7
Forgetting temporary file /tmp/duplicity-L0anjV-tempdir/mktemp-64oBHh-7
Processed volume 4 of 12
Registering (mktemp) temporary file /tmp/duplicity-L0anjV-tempdir/mktemp-
_M17PI-8
Writing Desktop/Tresorit.lnk of type reg

[...snip...]

Removing still remembered temporary file /tmp/duplicity-L0anjV-
tempdir/mkstemp-cSTvG5-1
Removing still remembered temporary file /tmp/duplicity-L0anjV-
tempdir/mktemp-pGWXBO-4
Removing still remembered temporary file /tmp/duplicity-L0anjV-
tempdir/mktemp-CipsuY-3
Removing still remembered temporary file /tmp/duplicity-L0anjV-
tempdir/mktemp-_M17PI-8
Traceback (most recent call last):
  File "/usr/local/bin/duplicity", line 1466, in <module>
    with_tempdir(main)
  File "/usr/local/bin/duplicity", line 1459, in with_tempdir
    fn()
  File "/usr/local/bin/duplicity", line 1393, in main
    restore(col_stats)
  File "/usr/local/bin/duplicity", line 687, in restore
    restore_get_patched_rop_iter(col_stats)):
  File "/usr/local/lib/python2.7/dist-packages/duplicity/patchdir.py", line
528, in Write_ROPaths
    ITR( ropath.index, ropath )
  File "/usr/local/lib/python2.7/dist-packages/duplicity/lazy.py", line
335, in __call__
    last_branch.fast_process, args)
  File "/usr/local/lib/python2.7/dist-packages/duplicity/robust.py", line
37, in check_common_error
    return function(*args)
  File "/usr/local/lib/python2.7/dist-packages/duplicity/patchdir.py", line
581, in fast_process
    ropath.copy( self.base_path.new_index( index ) )
  File "/usr/local/lib/python2.7/dist-packages/duplicity/path.py", line
444, in copy
    self.copy_attribs(other)
  File "/usr/local/lib/python2.7/dist-packages/duplicity/path.py", line
449, in copy_attribs
    util.maybe_ignore_errors(lambda: os.chown(other.name, self.stat.st_uid,
self.stat.st_gid))
  File "/usr/local/lib/python2.7/dist-packages/duplicity/util.py", line 65,
in maybe_ignore_errors
    return fn()
  File "/usr/local/lib/python2.7/dist-packages/duplicity/path.py", line
449, in <lambda>
    util.maybe_ignore_errors(lambda: os.chown(other.name, self.stat.st_uid,
self.stat.st_gid))
OverflowError: Python int too large to convert to C long

^[^CException KeyboardInterrupt in <module 'threading' from
'/usr/lib/python2.7/threading.pyc'> ignored
```
Original tags: encrypted gnupg local+repository restore

Story points: 6.0