mirror of
https://github.com/cupcakearmy/autorestic.git
synced 2024-12-22 16:26:25 +00:00
docs for global flags
This commit is contained in:
parent
1628384e1f
commit
fb6217d868
@ -1,8 +1,6 @@
|
|||||||
# Options
|
# Options
|
||||||
|
|
||||||
For the `backup` and `forget` commands you can pass any native flags to `restic`.
|
> ℹ️ For more detail see the [location docs](/location/options) for options, as they are the same.
|
||||||
|
|
||||||
> It is also possible to set options for an [a specific location](/location/options).
|
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
backend:
|
backend:
|
||||||
@ -18,8 +16,4 @@ backend:
|
|||||||
|
|
||||||
In this example, whenever `autorestic` runs `restic backup` it will append a `--tag abc --tag` to the native command.
|
In this example, whenever `autorestic` runs `restic backup` it will append a `--tag abc --tag` to the native command.
|
||||||
|
|
||||||
For more detail see the [location docs](/location/options) for options, as they are the same.
|
|
||||||
|
|
||||||
> For flags without arguments you can set them to `true`. They will be handled accordingly.
|
|
||||||
|
|
||||||
> :ToCPrevNext
|
> :ToCPrevNext
|
||||||
|
@ -1,8 +1,32 @@
|
|||||||
# Options
|
# Options
|
||||||
|
|
||||||
For the `backup` and `forget` commands you can pass any native flags to `restic`.
|
For the `backup` and `forget` commands you can pass any native flags to `restic`. In addition you can specify flags for every command with `all`.
|
||||||
|
|
||||||
> It is also possible to set options for an [entire backend](/backend/options).
|
If flags don't start with `-` they will get prefixed with `--`.
|
||||||
|
|
||||||
|
Flags without arguments can be set to `true`. They will be handled accordingly.
|
||||||
|
|
||||||
|
> ℹ️ It is also possible to set options for an [entire backend](/backend/options) or globally (see below).
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
locations:
|
||||||
|
foo:
|
||||||
|
# ...
|
||||||
|
options:
|
||||||
|
all:
|
||||||
|
some-flag: 123
|
||||||
|
# Equivalent to
|
||||||
|
--some-flag: 123
|
||||||
|
backup:
|
||||||
|
boolean-flag: true
|
||||||
|
tag:
|
||||||
|
- foo
|
||||||
|
- bar
|
||||||
|
```
|
||||||
|
|
||||||
|
## Example
|
||||||
|
|
||||||
|
In this example, whenever `autorestic` runs `restic backup` it will append a `--tag abc --tag` to the native command.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
locations:
|
locations:
|
||||||
@ -16,8 +40,22 @@ locations:
|
|||||||
- bar
|
- bar
|
||||||
```
|
```
|
||||||
|
|
||||||
In this example, whenever `autorestic` runs `restic backup` it will append a `--tag abc --tag` to the native command.
|
## Global Options
|
||||||
|
|
||||||
> For flags without arguments you can set them to `true`. They will be handled accordingly.
|
It is possible to specify global flags that will be run every time restic is invoked. To do so specify them under `global` in your config file.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
global:
|
||||||
|
all:
|
||||||
|
cache-dir: ~/restic
|
||||||
|
backup:
|
||||||
|
tag:
|
||||||
|
- foo
|
||||||
|
|
||||||
|
backends:
|
||||||
|
# ...
|
||||||
|
locations:
|
||||||
|
# ...
|
||||||
|
```
|
||||||
|
|
||||||
> :ToCPrevNext
|
> :ToCPrevNext
|
||||||
|
Loading…
Reference in New Issue
Block a user