-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR adds `run-before`, `run-after`, `run-failure` and `run-finally` hooks for: - all commands in the `[global.hooks]` config profile section - commands accessing the repository in the `[repository.hooks]` config profile section - the `backup` command specifically in the `[backup.hooks]` config profile section - specific backup sources in the `[backup.snapshots.hooks]` section Note: This PR includes only calling the given commands. If there is the wish for supplying information to the commands (env variables or parameter substitution), this should be covered by a separate feature request/PR. closes #902 --------- Signed-off-by: simonsan <[email protected]> Co-authored-by: simonsan <[email protected]>
- Loading branch information
Showing
75 changed files
with
1,625 additions
and
447 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Hooks configuration | ||
# | ||
# Hooks are commands that are run during certain events in the application lifecycle. | ||
# They can be used to run custom scripts or commands before or after certain actions. | ||
# The hooks are run in the order they are defined in the configuration file. | ||
# The hooks are divided into 4 categories: global, repository, backup, | ||
# and specific backup sources. | ||
# | ||
# You can also read a more detailed explanation of the hooks in the documentation: | ||
# https://rustic.cli.rs/docs/commands/misc/hooks.html | ||
# | ||
# Please make sure to check the in-repository documentation for the config files | ||
# available at: https://github.com/rustic-rs/rustic/blob/main/config/README.md | ||
# | ||
[global.hooks] | ||
run-before = [] | ||
run-after = [] | ||
run-failed = [] | ||
run-finally = [] | ||
|
||
[repository.hooks] | ||
run-before = [] | ||
run-after = [] | ||
run-failed = [] | ||
run-finally = [] | ||
|
||
[backup.hooks] | ||
run-before = [] | ||
run-after = [] | ||
run-failed = [] | ||
run-finally = [] | ||
|
||
[[backup.snapshots]] | ||
sources = [] | ||
hooks = { run-before = [], run-after = [], run-failed = [], run-finally = [] } |
Oops, something went wrong.