Manage encryption keys via keyfile or repokey modes
masterBorg supports two primary methods for storing encryption keys and secrets:
- keyfile mode: The key is stored in a file within the
keys/subdirectory of the Borg configuration directory on the client. - repokey mode: The key is stored within the repository itself under the
keys/namespace, named using the SHA256 of the Borg key content.
Commonalities:
- Both modes use the same internal data format.
- Keys are generated from random data and then encrypted using a key derived from your passphrase.
- Borg identifies the correct key by attempting to decrypt it with the provided passphrase.
- The passphrase can be provided via the
BORG_PASSPHRASEenvironment variable or through interactive prompts.