-
-
Notifications
You must be signed in to change notification settings - Fork 752
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
Encryption advice: Safety repokey vs. keyfile / reuse key or key password #5285
Comments
This is a good question. I feel that we can generate a new FAQ from the answer. As a first hint, the docs for |
for that scenario, you should use 1 repo per client for better security. ad 1: a key that is not protected by a passphrase is less safe than one that is (because if it is, you can not use it without also knowing the passphrase). repokey vs. keyfile is a matter of key storage location:
keyfile is maybe a bit more secure (if you trust your client more than your repo server, see borg's threat model), but can also be less safe at the same time (because if you totally lose your client [theft, SSD dies, lightning, ...], you also lose your keyfile). repokey has the key in the repository directory, so as long as you do not lose your repo, you likely also do not lose your key. there's a small chance to still lose it though, e.g. in case of a software or hardware bug or whatever. so you'll need key backups in both cases. also, if you passphrase protect the repokey, just having the repokey is not enough for an attacker to use it as they can't open it as they don't know the passphrase. i think this is all more or less covered in our docs, if something is missing, a PR would be welcome. ad 2: reusing passwords is usually a bad idea and the more often you reuse the same password, the worse it gets should it be disclosed. this is a very fundamental thing and has nothing to do with how borg works. considering that you usually need the plaintext passphrase at backup time to open the key and you usually want to automate this, there is no interactive password typing, but the password is either in some file or keyring or pw manager. should that one machine be compromised somehow and the password works also for other borg instances, you'ld have an avoidable escalation of damage. you need a (per repo) key backup anyway, so also having to backup the password doesn't make this significantly borg even offers a printable key backup. |
There is not "the answer" to this question. If you want to automate backups, your passwords have to be saved in plain text somewhere. If you don't want that, you can't automate the backup with password-protected keys.
|
Thank you very much for your comprehensive answers. I will go with keyfile with different passwords, as I have to backup the key anyway when using repokey (I did not consider this before). The printable key backup is very useful for this, very cool feature! |
This is a question. I'm planning a backup strategy based on borg. I have to backup two different machines to three different locations. As I consider the destinations untrusted, I want to encrypt my backup. This comes with the downside of having to backup the passwords / keys / location information in a seperate location, as these might get lost when my machine breaks. For backing up these information, it would be conventient to have as little as possible "pieces" to backup. This is where my questions arise. I did not find good answers to these questions (if my search strategy failed, I apologize).
Have you checked borgbackup docs, FAQ, and open Github issues?
Yes
Is this a BUG / ISSUE report or a QUESTION?
Question
System information. For client/server mode post info for both machines.
Client: MacBook
Server: Synology, Hetzner Storage Box
Your borg version (borg -V).
1.1.13
Operating system (distribution) and version.
macOS
The text was updated successfully, but these errors were encountered: