-
Notifications
You must be signed in to change notification settings - Fork 111
Description
I'm not sure this is a bug or a feature.
I have a remote repository used to copy local snapshots.
I wanted to be alerted whenever a command failed for this repository, and I used something like:
# rest_server.toml
[repository]
# ...
[[global.hooks.run-failed]]
command = "<alert>"This repository is used in a generic profile:
# global.toml
[copy]
targets = ["rest_server"]and included in app-specific profiles, e.g.:
# app.toml
[global]
use-profiles = ["global"]
# ...When the following command fails before of a repository issue (e.g. chunk size mismatch), the global hook is not called:
rustic -P app copyHowever, when using repository rather than global hooks, it works.
The documentation is unclear about whether this is normal. It states that repository hooks:
should be used for commands needed to set up the repository (like mounting the repo dir).
and that they are executed for:
each repository-accessing commands
Does that mean that global are mutually exclusive with repository hooks, and that, by extension, in order to have a "global" run-failed hook, it should be defined for global, repository, backup and backup.snapshots hooks?