From b87381cd3b3a968a9fc7650ab1c069d8d99fbc86 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Mon, 25 Oct 2021 18:02:51 +0200 Subject: [PATCH] docs for envs --- docs/markdown/backend/env.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 docs/markdown/backend/env.md diff --git a/docs/markdown/backend/env.md b/docs/markdown/backend/env.md new file mode 100644 index 0000000..4831c13 --- /dev/null +++ b/docs/markdown/backend/env.md @@ -0,0 +1,36 @@ +# Environment + +> ⚠ Available since version `v1.3.0` + +Sometimes it's favorable not having the encryption keys in the config files. +For that `autorestic` allows passing the backend keys as `ENV` variables, or through an env file. + +The syntax for the `ENV` variables is as follows: `AUTORESTIC_[BACKEND NAME]_KEY`. + +```yaml | autorestic.yaml +backend: + foo: + type: ... + path: ... + key: secret123 # => AUTORESTIC_FOO_KEY=secret123 +``` + +## Example + +This means we could remove `key: secret123` from `.autorestic.yaml` and execute as follows: + +```bash +AUTORESTIC_FOO_KEY=secret123 autorestic backup ... +``` + +## Env file + +Alternatively `autorestic` can load an env file, located next to `autorestic.yml` called `.autorestic.env`. + +```| .autorestic.env +AUTORESTIC_FOO_KEY=secret123 +``` + +after that you can simply use `autorestic` as your are used to. + +> :ToCPrevNext