Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to do backup to add-only cloud storage #188

Open
geek-merlin opened this issue Jan 12, 2021 · 2 comments
Open

How to do backup to add-only cloud storage #188

geek-merlin opened this issue Jan 12, 2021 · 2 comments

Comments

@geek-merlin
Copy link

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:

@dpc
Copy link
Owner

dpc commented Jan 13, 2021

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).

@geek-merlin
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants