Added consul script and starting hook_api updates

This commit is contained in:
Eric Renfro 2021-09-03 15:11:32 -04:00
parent 91bfbb7ff0
commit 26b25cb03c
Signed by: psi-jack
GPG Key ID: 14977F3A50D9A5BF
2 changed files with 21 additions and 2 deletions

19
scripts/consul Normal file
View File

@ -0,0 +1,19 @@
#!/bin/bash
hook_check() {
:
}
hook_pre() {
consul snapshot save /etc/restore/consul.snap
}
hook_post() {
:
}
case "$1" in
before_check) hook_check;;
before_backup) hook_pre;;
after_backup) hook_post;;
esac

View File

@ -336,7 +336,7 @@ hooks:
# before_backup:
# - echo "Starting a backup."
before_backup:
- run-parts /etc/borgmatic/prebackup.d
- run-parts -a before_backup /etc/borgmatic/prebackup.d
# List of one or more shell commands or scripts to execute
# before pruning, run once per configuration file.
@ -358,7 +358,7 @@ hooks:
# after_backup:
# - echo "Finished a backup."
after_backup:
- run-parts /etc/borgmatic/postbackup.d
- run-parts -a after_backup /etc/borgmatic/postbackup.d
# List of one or more shell commands or scripts to execute
# after pruning, run once per configuration file.