我刚刚使用 Duplicity 进行了完整备份--full-if-older-than 7D
。现在执行此操作时duplicity remove-older-than 7D --force
,我看到以下内容:
Last full backup date: Sun Feb 23 12:19:43 2020 (just a few minutes ago)
There are backup set(s) at time(s):
...
...
...
Which can't be deleted because newer sets depend on them.
No old backup sets found, nothing deleted.
如果我像刚才一样进行完整备份,难道我不应该删除所有超过 7 天的旧备份吗?还是因为我的增量备份7 天以内(例如昨天)是否依赖于较旧的集合?
答案1
检查您的后端。我使用的scp:
不支持delete
四种可能的操作中的、 和get
操作put
。我阅读了手册页的“SSH 后端说明”部分(特别是段落“SSH pexpect 后端”),然后将我的后端更改为解决了删除问题的。list
delete
sftp:
答案2
你可以阅读 :
--remove-older-than <time> [--force] <url>
Delete all backup sets older than the given time. Old
backup sets will not be deleted if backup sets newer than
time depend on them. Note also that
--force will be needed to delete the files instead of just
listing them.
这个想法是,duplicity 保留了从指定时间回溯的可能性,并且保留可能更早的依赖关系。
如果您想要回到过去 7 天并且每 7 天进行一次完整备份,您可能有以下备份:
D-7:inc
D-6:*full*
D-5:inc
D-4:inc
D-3:inc
D-2:inc
D-1:inc
这里,必须保留 D-7 备份,还必须保留依赖项(完整的 D-13 和以下增量备份)。