恢复时出现 Duplicity 错误

恢复时出现 Duplicity 错误

我正在尝试通过 duplicity 备份恢复一个文件夹,但我总是收到此回溯错误

我整个上午都在 Google 上搜索这个问题,最后终于解决了 :(

我使用这个命令是duplicity -v9 --no-encryption --force --file-to-restore Operadora/Irene file:///mnt/nas irene因为我想恢复 realiteve Irene 文件夹

  Traceback (most recent call last):
  File "/usr/bin/duplicity", line 1548, in <module>
    with_tempdir(main)
  File "/usr/bin/duplicity", line 1534, in with_tempdir
    fn()
  File "/usr/bin/duplicity", line 1383, in main
    do_backup(action)
  File "/usr/bin/duplicity", line 1462, in do_backup
    restore(col_stats)
  File "/usr/bin/duplicity", line 729, in restore
    restore_get_patched_rop_iter(col_stats)):
  File "/usr/lib/python2.7/dist-packages/duplicity/patchdir.py", line 558, in Write_ROPaths
    for ropath in rop_iter:
  File "/usr/lib/python2.7/dist-packages/duplicity/patchdir.py", line 521, in integrate_patch_iters
    for patch_seq in collated:
  File "/usr/lib/python2.7/dist-packages/duplicity/patchdir.py", line 389, in yield_tuples
    setrorps(overflow, elems)
  File "/usr/lib/python2.7/dist-packages/duplicity/patchdir.py", line 378, in setrorps
    elems[i] = iter_list[i].next()
  File "/usr/lib/python2.7/dist-packages/duplicity/patchdir.py", line 107, in filter_path_iter
    for path in path_iter:
  File "/usr/lib/python2.7/dist-packages/duplicity/patchdir.py", line 121, in difftar2path_iter
    tarinfo_list = [tar_iter.next()]
  File "/usr/lib/python2.7/dist-packages/duplicity/patchdir.py", line 339, in next
    self.set_tarfile()
  File "/usr/lib/python2.7/dist-packages/duplicity/patchdir.py", line 333, in set_tarfile
    self.current_fp = self.fileobj_iter.next()
  File "/usr/bin/duplicity", line 765, in get_fileobj_iter
    backup_set.volume_name_dict[vol_num],
KeyError: 19

答案1

这可能是由于缓存损坏造成的。我们应该向 duplicity 提交错误报告以清除错误消息,但同时清除缓存:

rm -r ~/.cache/duplicity

相关内容