![尝试恢复备份文件](https://linux22.com/image/881003/%E5%B0%9D%E8%AF%95%E6%81%A2%E5%A4%8D%E5%A4%87%E4%BB%BD%E6%96%87%E4%BB%B6.png)
这是我尝试恢复文件时得到的结果:
Traceback (most recent call last):
File "/usr/bin/duplicity", line 1494, in <module>
with_tempdir(main)
File "/usr/bin/duplicity", line 1488, in with_tempdir
fn()
File "/usr/bin/duplicity", line 1337, in main
do_backup(action)
File "/usr/bin/duplicity", line 1370, in do_backup
globals.archive_dir).set_values()
File "/usr/lib/python2.7/dist-packages/duplicity/collections.py", line 697, in set_values
self.get_backup_chains(partials + backend_filename_list)
File "/usr/lib/python2.7/dist-packages/duplicity/collections.py", line 819, in get_backup_chains
map(add_to_sets, filename_list)
File "/usr/lib/python2.7/dist-packages/duplicity/collections.py", line 809, in add_to_sets
if set.add_filename(filename):
File "/usr/lib/python2.7/dist-packages/duplicity/collections.py", line 100, in add_filename
(self.volume_name_dict, filename)
AssertionError: ({1: 'duplicity
之后是备份文件列表。我做了完整备份,然后从 32 位 14.04 升级到 64 位。我想我可以只使用备份来恢复我的文件,但显然它不是那样工作的。通过阅读和谷歌搜索这个问题,我觉得可以恢复我的文档和图片,但我对编码语言的理解不够。
我设法将一些文件放入多卷快照中。如何打开或解密它们?
答案1
当我遇到类似的问题时,我只是盲目地注释掉有问题的断言,它就像魔术一样起作用了!
因此修改/usr/bin/duplicity
并注释掉第 1370 行并再次运行就应该没问题了。