rdedup icon indicating copy to clipboard operation
rdedup copied to clipboard

How to do backup to add-only cloud storage

Open geek-merlin opened this issue 4 years ago • 2 comments

One strategy to protect backups from ransomware (think an evil software that not only encrypts local files, but deletes any cloud storage it can get grip of) is to have "no delete" mode for cloud storage backup account. (you can still have another account that can delete, for pruning from another machine. Or add eternally. ;-)

This should be no problem with chunk and name files. But i wonder what happens wrt locking? The backup process adds a lock file, backs up happily, but in the end can't delete it, and the next backup will fail?

Some links that show this is a much wanted feature and people are discussing that for many backup frameworks:

geek-merlin avatar Jan 12 '21 22:01 geek-merlin

There could be many lock files, each with a timestamp and explicit expiration. An agent that is holding the lock would be supposed to write out a new lock file before the previous one expires. When done it would finish with a final lock file where the expiration == aquiring, to signal that it's done. These lock files would accumulate, but could safely be removed when possible. To avoid race conditions, agents should first write out their lock file, and then double check if their file is indeed the highest one (after certain, small but reasonably safe period).

dpc avatar Jan 13 '21 00:01 dpc

Hey, this sounds reasonable. Ovyiously you're much more into locking than me.

geek-merlin avatar Jan 13 '21 01:01 geek-merlin