我正在使用 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
你从上面的恢复命令
在 s3:// url 的末尾缺少“/dir” 。如果添加后找不到您的备份,我建议加入重复邮件列表并将其发布在那里,以便我们可以尝试更详细地找到您的问题。
..ede/duply.net
根据 ede 的回答中的线索,我修改了我的恢复行,将我想要恢复的目录的名称添加到 s3:// url 的末尾:
s3+ http://my-s3-bucket/duplicity/ dir /home/restored
然后它找到了备份链,但说它在其中找不到“dir”。
然后我尝试删除
--file-to-restore
开关以使命令如下:这行得通。
顺便说一句,即使我已经阅读了手册页并查看了一些示例,我发现很难想出一种方法来记住如何正确地从重复存档中恢复文件。如果有人有一种简洁的方式来解释与文件路径和链相关的重复性如何工作,我将不胜感激。