mirror of
https://github.com/cupcakearmy/autorestic.git
synced 2025-09-05 18:10:40 +00:00
Add option to crash autorestic
when key is missing instead of generating a new key (#383)
* feat(backend): add requireKey option to backend This option will prevent `autorestic` from generating a key and will cause it to crash instead. This is intended for use cases where you want to provision the key yourself and don't want `autorestic` to accidentally generate one for you. * doc(backend): document requireKey
This commit is contained in:
@@ -16,3 +16,25 @@ backends:
|
||||
## Types
|
||||
|
||||
We restic supports multiple types of backends. See the [full list](/backend/available) for details.
|
||||
|
||||
## Avoid Generating Keys
|
||||
|
||||
By default, `autorestic` will generate a key for every backend if none is defined. This is done by updating your config file with the key.
|
||||
|
||||
In cases where you want to provide the key yourself, you can ensure that `autorestic` doesn't accidentally generate one for you by setting `requireKey: true`.
|
||||
|
||||
Example:
|
||||
|
||||
```yaml | .autorestic.yml
|
||||
version: 2
|
||||
|
||||
backends:
|
||||
foo:
|
||||
type: local
|
||||
path: /data/my/backups
|
||||
# Alternatively, you can set the key through the `AUTORESTIC_FOO_RESTIC_PASSWORD` environment variable.
|
||||
key: ... your key here ...
|
||||
requireKey: true
|
||||
```
|
||||
|
||||
With this setting, if a key is missing, `autorestic` will crash instead of generating a new key and updating your config file.
|
||||
|
Reference in New Issue
Block a user