-
-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #118 from cupcakearmy/1.4.0
1.4.0
- Loading branch information
Showing
17 changed files
with
215 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,67 @@ | ||
# Environment | ||
|
||
> ⚠ Available since version `v1.3.0` | ||
> ⚠ Available since version `v1.4.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. | ||
For that `autorestic` allows passing the env variables to backend password as `ENV` variables, or through an env file. | ||
You can also pass whatever `env` variable to restic by prefixing it with `AUTORESTIC_[BACKEND NAME]_`. | ||
|
||
The syntax for the `ENV` variables is as follows: `AUTORESTIC_[BACKEND NAME]_KEY`. | ||
> ℹ️ Env variables and file overwrite the config file in the following order: | ||
> | ||
> Env Variables > Env File (`.autorestic.env`) > Config file (`.autorestic.yaml`) | ||
## Env file | ||
|
||
Alternatively `autorestic` can load an env file, located next to `.autorestic.yml` called `.autorestic.env`. | ||
|
||
``` | ||
AUTORESTIC_FOO_RESTIC_PASSWORD=secret123 | ||
``` | ||
|
||
### Example with repository password | ||
|
||
The syntax for the `ENV` variables is as follows: `AUTORESTIC_[BACKEND NAME]_RESTIC_PASSWORD`. | ||
|
||
```yaml | autorestic.yaml | ||
backend: | ||
foo: | ||
type: ... | ||
path: ... | ||
key: secret123 # => AUTORESTIC_FOO_KEY=secret123 | ||
key: secret123 # => AUTORESTIC_FOO_RESTIC_PASSWORD=secret123 | ||
``` | ||
## Example | ||
This means we could remove `key: secret123` from `.autorestic.yaml` and execute as follows: | ||
|
||
```bash | ||
AUTORESTIC_FOO_KEY=secret123 autorestic backup ... | ||
AUTORESTIC_FOO_RESTIC_PASSWORD=secret123 autorestic backup ... | ||
``` | ||
|
||
## Env file | ||
### Example with Backblaze B2 | ||
|
||
```yaml | autorestic.yaml | ||
backends: | ||
bb: | ||
type: b2 | ||
path: myBucket | ||
key: myPassword | ||
env: | ||
B2_ACCOUNT_ID: 123 | ||
B2_ACCOUNT_KEY: 456 | ||
``` | ||
|
||
Alternatively `autorestic` can load an env file, located next to `autorestic.yml` called `.autorestic.env`. | ||
You could create an `.autorestic.env` or pass the following `ENV` variables to autorestic: | ||
|
||
```| .autorestic.env | ||
AUTORESTIC_FOO_KEY=secret123 | ||
``` | ||
AUTORESTIC_BB_RESTIC_PASSWORD=myPassword | ||
AUTORESTIC_BB_B2_ACCOUNT_ID=123 | ||
AUTORESTIC_BB_B2_ACCOUNT_KEY=456 | ||
``` | ||
|
||
after that you can simply use `autorestic` as your are used to. | ||
```yaml | autorestic.yaml | ||
backends: | ||
bb: | ||
type: b2 | ||
path: myBucket | ||
``` | ||
|
||
> :ToCPrevNext |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
de663f2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs: