如何保护口是心非的备份

How to protect Duplicity backups

我使用 Duplicity 将我的托管帐户备份到使用 WebDav 的远程服务器。时间表是每日增量,每月完整。

我还想保护备份免受托管攻击,所以我必须确保服务器(Duplicity 在哪里)不能破坏远程服务器上的备份。

是否有推荐的保护备份的解决方案?

如果不是我想在远程服务器上制作脚本,什么会使备份在上传后变为只读。 (最终它还会删除早于 x 个月的备份。)

我可以制作这个脚本,但我不确定哪些文件可以被安全保护。如果我定期 chmod o-w 所有文件,备份会在第二天继续吗?或者 Duplicity 需要写入尚未上传的文件?如何确定 Duplicity 需要更改哪些文件,哪些不需要更改?

如何删除旧备份而不破坏某些内容?

I use Duplicity for backing up my hosting account to remote server using WebDav. Schedule is daily incremental, monthly full.

I want to also protect backups against hosting hack, so I have to be sure that server (where is Duplicity) can not destrol backups on remote server.

这不是口是心非的目的。它的主要功能是加密,以保护您在可能不安全的后端上的备份。

如果你的机器被黑了,你的主要问题可能不是备份破坏而是默默地备份攻击者上传的恶意代码。

Is there recommended solution for protecting backups?

据我所知不是。第二个存储库,您可以在其中使用 --link-dest 或 dirvish rsync 来实现备份的快照式备份。这样攻击者可以 modify/corrupt 您的旧备份,但您仍然拥有正确的文件。但是接下来的问题仍然是找出您的备份从哪个时间点开始被弄脏。

If not I thinked up about to make script on remote server, what will make backups read-only after they were uploaded. (And eventually it also delete backups older than x months.)

只要最后一次口是心非 运行 成功,就应该有效。唯一一次口是心非地覆盖后端的东西是当它恢复中断的备份时。

I can make this script, but I am not sure what files can be protected safely. If I chmod o-w all files periodically, will backups continue next day? Or Duplicity needs to write to yet uploaded files? How to determine what files will Duplicity need to change and what not?

看我之前的回答。

How can I delete old backups and not break something?

使用口是心非的清除命令。你可以 运行 在你的 webdav 机器上作为一个用户仍然对 repo 有写入权限。

玩得开心.. ede/duply.net