rustic-rs / rustic

rustic - fast, encrypted, and deduplicated backups powered by Rust
https://rustic.cli.rs
Apache License 2.0
1.67k stars 63 forks source link

Unencrypted backups #434

Open nickchomey opened 1 year ago

nickchomey commented 1 year ago

This is a duplicate of this issue from restic. https://github.com/restic/restic/issues/1018

I'd like to be able to create backups that aren't encrypted at all. Is this something that could be implemented?

It is something that would be useful for many users, in particular for using rustic as an incremental backup mechanism in the open source Cyberpanel server control panel https://community.cyberpanel.net/t/cyberpanel-backups-v2-proposal/40370/

aawsome commented 1 year ago

Thanks for opening this issue @nickchomey

I thought a bit about it. Actually I find the points given in the restic discussion why it might be a bad idea to add unencrypted backuse quite relevant. On the other hand it should be not too hard to just disable the encryption. But that would mean to keep the repo format almost identical including a nonce and a checksum but just omitting the encryption part. Adding a random nonce is really important as rustic does rely on the fact that an "identical" file saved twice results in different filenames due to different hashes of the contents.

So, I would suggest the following:

nickchomey commented 1 year ago

That sounds like a good approach to me! Its not urgent to implement, but I look forward to seeing it someday!

simonsan commented 1 year ago

I thought a bit about it. Actually I find the points given in the restic discussion why it might be a bad idea to add unencrypted backuse quite relevant.

Agreed! I think opting out of the encryption should be possible though, but should definitely behind a flag, that isn't easily confused and also have a warning attached to it. Something in big fat red letters, when making a backup and each time interacting with such a repository, in the sense like: "This is not encrypted, we hope you know what you're doing!".

Having unencrypted backups is definitely a special use case and I for myself am also on-board. Various hard-drives in my household are fully-encrypted and need to be temporarily decrypted for storing a backup. In this case it doesn't make sense to add another level of encryption on top of it, when the encryption of my hard drives is broken, it really doesn't matter, if the backups are accessible.

BUT: as i have an offsite copy that I keep on some cloud drive, this one I would like to be encrypted. So it should be generally possible to have offsite copies of repositories that are encrypted and can be copied to, while having a local unencrypted repository.