Clarify documentation/schema about on_error hook running if there's an error in another hook (#202).
This commit is contained in:
parent
7ad8f9ac6f
commit
e25f2c4e6c
2 changed files with 7 additions and 5 deletions
|
@ -345,9 +345,11 @@ map:
|
||||||
on_error:
|
on_error:
|
||||||
seq:
|
seq:
|
||||||
- type: scalar
|
- type: scalar
|
||||||
desc: List of one or more shell commands or scripts to execute in case an exception has occurred.
|
desc: |
|
||||||
|
List of one or more shell commands or scripts to execute when an exception occurs
|
||||||
|
during a backup or when running a hook.
|
||||||
example:
|
example:
|
||||||
- echo "Error while creating a backup."
|
- echo "Error while creating a backup or running a hook."
|
||||||
umask:
|
umask:
|
||||||
type: scalar
|
type: scalar
|
||||||
desc: Umask used when executing hooks. Defaults to the umask that borgmatic is run with.
|
desc: Umask used when executing hooks. Defaults to the umask that borgmatic is run with.
|
||||||
|
|
|
@ -27,13 +27,13 @@ not if an error occurs in a previous hook or in the backups themselves.
|
||||||
|
|
||||||
## Error hooks
|
## Error hooks
|
||||||
|
|
||||||
borgmatic also runs `on_error` hooks if an error occurs. Here's an example
|
borgmatic also runs `on_error` hooks if an error occurs, either when creating
|
||||||
configuration:
|
a backup or running another hook. Here's an example configuration:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
hooks:
|
hooks:
|
||||||
on_error:
|
on_error:
|
||||||
- echo "Error while creating a backup."
|
- echo "Error while creating a backup or running a hook."
|
||||||
```
|
```
|
||||||
|
|
||||||
## Hook output
|
## Hook output
|
||||||
|
|
Loading…
Reference in a new issue