![duplicity“CollectionsError:未找到备份链”](https://linux22.com/image/737696/duplicity%E2%80%9CCollectionsError%EF%BC%9A%E6%9C%AA%E6%89%BE%E5%88%B0%E5%A4%87%E4%BB%BD%E9%93%BE%E2%80%9D.png)
我使用 duplicity 0.7.06 进行备份,使用 0.7.17 恢复 duplicity 备份。但是当我尝试从中恢复目录时,出现了“未找到备份链”的错误。
但我不确定该错误意味着什么。
备份如下(并且没有错误):
duplicity --no-encryption --full-if-older-than 10D /path/to/dir s3+http://my-s3-bucket/duplicity/dir
如果我列出它们,我就可以看到重复的档案:
~$ s3cmd ls s3://my-s3-bucket/duplicity/dir/
2019-05-12 15:51 19505 s3://my-s3-bucket/duplicity/dir/duplicity-full-signatures.20190512T155147Z.sigtar.gz
2019-05-12 15:51 724 s3://my-s3-bucket/duplicity/dir/duplicity-full.20190512T155147Z.manifest
2019-05-12 15:51 728333 s3://my-s3-bucket/duplicity/dir/duplicity-full.20190512T155147Z.vol1.difftar.gz
我试图像这样恢复它:
duplicity --file-to-restore path/to/dir s3+http://my-s3-bucket/duplicity /home/restored/dir
我收到的错误是:
duplicity 0.7.17 (February 26, 2018)
Args: /usr/bin/duplicity --file-to-restore path/to/dir s3+http://my-s3-bucket/duplicity /home/restored/dir
Linux machinename 4.15.0-48-generic #51-Ubuntu SMP Wed Apr 3 08:28:49 UTC 2019 x86_64 x86_64
/usr/bin/python2 2.7.15rc1 (default, Nov 12 2018, 14:31:15)
[GCC 7.3.0]
================================================================================
Using temporary directory /tmp/duplicity-Zu29z3-tempdir
Temp has 30699757568 available, backup will use approx 272629760.
Local and Remote metadata are synchronized, no sync needed.
Last full backup date: none
Traceback (innermost last):
File "/usr/bin/duplicity", line 1555, in <module>
with_tempdir(main)
File "/usr/bin/duplicity", line 1541, in with_tempdir
fn()
File "/usr/bin/duplicity", line 1393, in main
do_backup(action)
File "/usr/bin/duplicity", line 1472, in do_backup
restore(col_stats)
File "/usr/bin/duplicity", line 728, in restore
restore_get_patched_rop_iter(col_stats)):
File "/usr/bin/duplicity", line 750, in restore_get_patched_rop_iter
backup_chain = col_stats.get_backup_chain_at_time(time)
File "/usr/lib/python2.7/dist-packages/duplicity/collections.py", line 974, in get_backup_chain_at_time
raise CollectionsError("No backup chains found")
CollectionsError: No backup chains found
答案1
您上面的恢复命令
duplicity --file-to-restore path/to/dir s3+http://my-s3-bucket/duplicity /home/restored/dir
缺乏‘/目录’在 s3:// url 的末尾。如果添加后找不到您的备份,我建议加入重复邮件列表并将其发布在那里,以便我们可以尝试更详细地找到您的问题。
..ede/duply.net
答案2
根据 ede 的回答中的线索,我修改了恢复行,将我想要恢复的目录的名称添加到 s3:// url 的末尾:
s3+http://我的-S3-桶/duplicity/目录/主页/恢复
然后找到了备份链,但说无法在其中找到“dir”。
然后我尝试移除--file-to-restore
开关以执行以下命令:
duplicity --no-encryption s3+http://my-s3-bucket/duplicity/dir /home/restored/dir
这有效。
顺便说一句,即使我读过手册页并查看过一些例子,我发现很难想出一种方法来记住如何正确地从 duplicity 存档中恢复文件。如果有人能巧妙地解释 duplicity 如何与文件路径和链相关,我将不胜感激。