duplicity crashes on restore

Bug #1642813 reported by Ravi
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Duplicity
Fix Released
Medium
Unassigned
duplicity (Ubuntu)
Fix Released
High
Unassigned
Zesty
Fix Released
High
Unassigned

Bug Description

$ duplicity -t 7D --file-to-restore folderIWantToRestore file:///my/backup/location target_directory
Synchronizing remote metadata to local cache...
GnuPG passphrase:
Copying duplicity-full-signatures.20160402T183617Z.sigtar.gpg to local cache.
Copying duplicity-full-signatures.20160708T041150Z.sigtar.gpg to local cache.
Copying duplicity-full-signatures.20161006T101852Z.sigtar.gpg to local cache.
Copying duplicity-full.20160402T183617Z.manifest.gpg to local cache.
Copying duplicity-full.20160708T041150Z.manifest.gpg to local cache.
Copying duplicity-full.20161006T101852Z.manifest.gpg to local cache.
Copying duplicity-inc.20160402T183617Z.to.20160421T101839Z.manifest.gpg to local cache.
Copying duplicity-inc.20160421T101839Z.to.20160506T054020Z.manifest.gpg to local cache.
Copying duplicity-inc.20160506T054020Z.to.20160512T101918Z.manifest.gpg to local cache.
Copying duplicity-inc.20160512T101918Z.to.20160519T102000Z.manifest.gpg to local cache.
Copying duplicity-inc.20160519T102000Z.to.20160603T030556Z.manifest.gpg to local cache.
Copying duplicity-inc.20160603T030556Z.to.20160611T044724Z.manifest.gpg to local cache.
Copying duplicity-inc.20160611T044724Z.to.20160701T061452Z.manifest.gpg to local cache.
Copying duplicity-inc.20160708T041150Z.to.20160714T101926Z.manifest.gpg to local cache.
Copying duplicity-inc.20160714T101926Z.to.20160721T101823Z.manifest.gpg to local cache.
Copying duplicity-inc.20160721T101823Z.to.20160728T101920Z.manifest.gpg to local cache.
Copying duplicity-inc.20160728T101920Z.to.20160804T101832Z.manifest.gpg to local cache.
Copying duplicity-inc.20160804T101832Z.to.20160811T101925Z.manifest.gpg to local cache.
Copying duplicity-inc.20160811T101925Z.to.20160818T101907Z.manifest.gpg to local cache.
Copying duplicity-inc.20160818T101907Z.to.20160825T101928Z.manifest.gpg to local cache.
Copying duplicity-inc.20160825T101928Z.to.20160901T101914Z.manifest.gpg to local cache.
Copying duplicity-inc.20160901T101914Z.to.20160908T101828Z.manifest.gpg to local cache.
Copying duplicity-inc.20160908T101828Z.to.20160915T101847Z.manifest.gpg to local cache.
Copying duplicity-inc.20160915T101847Z.to.20160922T101825Z.manifest.gpg to local cache.
Copying duplicity-inc.20160922T101825Z.to.20160929T101858Z.manifest.gpg to local cache.
Copying duplicity-inc.20161006T101852Z.to.20161013T101740Z.manifest.gpg to local cache.
Copying duplicity-inc.20161013T101740Z.to.20161020T101817Z.manifest.gpg to local cache.
Copying duplicity-inc.20161020T101817Z.to.20161027T101934Z.manifest.gpg to local cache.
Copying duplicity-inc.20161027T101934Z.to.20161103T101934Z.manifest.gpg to local cache.
Copying duplicity-inc.20161103T101934Z.to.20161110T102658Z.manifest.gpg to local cache.
Copying duplicity-inc.20161110T102658Z.to.20161117T102532Z.manifest.gpg to local cache.
Copying duplicity-new-signatures.20160402T183617Z.to.20160421T101839Z.sigtar.gpg to local cache.
Copying duplicity-new-signatures.20160421T101839Z.to.20160506T054020Z.sigtar.gpg to local cache.
Copying duplicity-new-signatures.20160506T054020Z.to.20160512T101918Z.sigtar.gpg to local cache.
Copying duplicity-new-signatures.20160512T101918Z.to.20160519T102000Z.sigtar.gpg to local cache.
Copying duplicity-new-signatures.20160519T102000Z.to.20160603T030556Z.sigtar.gpg to local cache.
Copying duplicity-new-signatures.20160603T030556Z.to.20160611T044724Z.sigtar.gpg to local cache.
Copying duplicity-new-signatures.20160611T044724Z.to.20160701T061452Z.sigtar.gpg to local cache.
Copying duplicity-new-signatures.20160708T041150Z.to.20160714T101926Z.sigtar.gpg to local cache.
Copying duplicity-new-signatures.20160714T101926Z.to.20160721T101823Z.sigtar.gpg to local cache.
Cleanup of temporary directory /tmp/duplicity-LmurBX-tempdir failed - this is probably a bug.
Traceback (most recent call last):
  File "/usr/bin/duplicity", line 1546, in <module>
    with_tempdir(main)
  File "/usr/bin/duplicity", line 1540, in with_tempdir
    fn()
  File "/usr/bin/duplicity", line 1391, in main
    do_backup(action)
  File "/usr/bin/duplicity", line 1412, in do_backup
    sync_archive(decrypt)
  File "/usr/bin/duplicity", line 1199, in sync_archive
    copy_to_local(fn)
  File "/usr/bin/duplicity", line 1146, in copy_to_local
    tdp.move(globals.archive_dir.append(loc_name))
  File "/usr/lib64/python2.7/site-packages/duplicity/path.py", line 636, in move
    self.copy(new_path)
  File "/usr/lib64/python2.7/site-packages/duplicity/path.py", line 462, in copy
    self.copy_attribs(other)
  File "/usr/lib64/python2.7/site-packages/duplicity/path.py", line 467, in copy_attribs
    util.maybe_ignore_errors(lambda: os.chown(other.name, self.stat.st_uid, self.stat.st_gid))
  File "/usr/lib64/python2.7/site-packages/duplicity/util.py", line 93, in maybe_ignore_errors
    return fn()
  File "/usr/lib64/python2.7/site-packages/duplicity/path.py", line 467, in <lambda>
    util.maybe_ignore_errors(lambda: os.chown(other.name, self.stat.st_uid, self.stat.st_gid))
AttributeError: 'NoneType' object has no attribute 'st_uid'

When I modified line path.py:467
            if self.stat is not None:
                util.maybe_ignore_errors(lambda: os.chown(other.name, self.stat.st_uid, self.stat.st_gid))

the command successfully completed.
$ duplicity -t 7D --file-to-restore folderIWantToRestore file:///my/backup/location target_directory
Synchronizing remote metadata to local cache...
GnuPG passphrase:
Copying duplicity-new-signatures.20160714T101926Z.to.20160721T101823Z.sigtar.gpg to local cache.
Copying duplicity-new-signatures.20160721T101823Z.to.20160728T101920Z.sigtar.gpg to local cache.
Copying duplicity-new-signatures.20160728T101920Z.to.20160804T101832Z.sigtar.gpg to local cache.
Copying duplicity-new-signatures.20160804T101832Z.to.20160811T101925Z.sigtar.gpg to local cache.
Copying duplicity-new-signatures.20160811T101925Z.to.20160818T101907Z.sigtar.gpg to local cache.
Copying duplicity-new-signatures.20160818T101907Z.to.20160825T101928Z.sigtar.gpg to local cache.
Copying duplicity-new-signatures.20160825T101928Z.to.20160901T101914Z.sigtar.gpg to local cache.
Copying duplicity-new-signatures.20160901T101914Z.to.20160908T101828Z.sigtar.gpg to local cache.
Copying duplicity-new-signatures.20160908T101828Z.to.20160915T101847Z.sigtar.gpg to local cache.
Copying duplicity-new-signatures.20160915T101847Z.to.20160922T101825Z.sigtar.gpg to local cache.
Copying duplicity-new-signatures.20160922T101825Z.to.20160929T101858Z.sigtar.gpg to local cache.
Copying duplicity-new-signatures.20161006T101852Z.to.20161013T101740Z.sigtar.gpg to local cache.
Copying duplicity-new-signatures.20161013T101740Z.to.20161020T101817Z.sigtar.gpg to local cache.
Copying duplicity-new-signatures.20161020T101817Z.to.20161027T101934Z.sigtar.gpg to local cache.
Copying duplicity-new-signatures.20161027T101934Z.to.20161103T101934Z.sigtar.gpg to local cache.
Copying duplicity-new-signatures.20161103T101934Z.to.20161110T102658Z.sigtar.gpg to local cache.
Copying duplicity-new-signatures.20161110T102658Z.to.20161117T102532Z.sigtar.gpg to local cache.
Last full backup date: Thu Oct 6 03:18:52 2016
folderIWantToRestore not found in archive - no files restored.

Thanks for creating this software btw! :-)

Tags: patch
Revision history for this message
Ravi (raviprak) wrote :
Changed in duplicity:
importance: Undecided → Medium
milestone: none → 0.7.11
status: New → Fix Committed
Changed in duplicity:
status: Fix Committed → Fix Released
Revision history for this message
Vej (vej) wrote :

This might fix bug #1290852.

Changed in duplicity (Ubuntu):
status: New → Triaged
importance: Undecided → High
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "Simple one line fix" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Ravi (raviprak) wrote :

Thanks for committing the patch Kenneth and the tip Vej!

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package duplicity - 0.7.06-2ubuntu3

---------------
duplicity (0.7.06-2ubuntu3) zesty; urgency=medium

  * d/p/backport-fix-tags-in-locked-folders.patch:
    - Fix OSError looking for tag in locked folders with exclude-if-present
      (LP: #1620085)
  * d/p/backport-crash-on-restore.patch:
    - Guard a chown call to avoid a stacktrace (LP: #1642813)
  * d/p/backport-ignore-excluded-locked-files.patch:
    - Ignore excluded locked files rather than giving noisy errors
      (LP: #1089131)
  * d/p/backport-downgrade-error.patch:
    - Make locked file messages be warnings not errors, again. This avoids
      confusing deja-dup. (LP: #1605939)
  * d/p/backport-flush-after-write.patch:
    - Flush after writing a temp file, to keep disk in sync (LP: #1538333)
  * d/p/backport-gpg2.patch:
    - Improve support for gpg2 (fixing FTBFS in process)

 -- Michael Terry <email address hidden> Tue, 07 Mar 2017 18:48:01 -0500

Changed in duplicity (Ubuntu Zesty):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.