I'm struggling to restore backups from an older installation of Ubuntu to a new installation on Ubuntu 16.04. I get the following error when trying to restore:
Failed with an unknown error
Followed by:
Traceback (most recent call last):
File "/usr/bin/duplicity", line 1532, in <module>
with_tempdir(main)
File "/usr/bin/duplicity", line 1526, in with_tempdir
fn()
File "/usr/bin/duplicity", line 1380, in main
do_backup(action)
File "/usr/bin/duplicity", line 1461, in do_backup
list_current(col_stats)
File "/usr/bin/duplicity", line 698, in list_current
for path in path_iter:
File "/usr/lib/python2.7/dist-packages/duplicity/diffdir.py", line 354, in combine_path_iters
refresh_triple_list(triple_list)
File "/usr/lib/python2.7/dist-packages/duplicity/diffdir.py", line 341, in refresh_triple_list
new_triple = get_triple(old_triple[1])
File "/usr/lib/python2.7/dist-packages/duplicity/diffdir.py", line 327, in get_triple
path = path_iter_list[iter_index].next()
File "/usr/lib/python2.7/dist-packages/duplicity/diffdir.py", line 239, in sigtar2path_iter
for tarinfo in tf:
File "/usr/lib/python2.7/tarfile.py", line 2508, in next
tarinfo = self.tarfile.next()
File "/usr/lib/python2.7/tarfile.py", line 2350, in next
raise ReadError("unexpected end of data")
ReadError: unexpected end of data
The backup completed successfully but I cannot get it to restore.
Thanks in advance!
Best Answer
Edit: Disclaimer - I don't have much experience with Python or duplicity's code so I cannot say if this modification will or will not cause any detrimental effects. For me, I was able to complete my restore by adding the line of code below.
Solution: I was able to move past this inserting a key check for the
volume_name_dict
object.New line:
if vol_num in backup_set.volume_name_dict.keys():
In duplicity 0.7.06, you can replace this method at line 752:
If you are not familiar with Python (I'm not) you can validate the code here: http://pep8online.com/ - the indentations must align properly.