Added consul script and starting hook_api updates
This commit is contained in:
parent
91bfbb7ff0
commit
26b25cb03c
2 changed files with 21 additions and 2 deletions
19
scripts/consul
Normal file
19
scripts/consul
Normal 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
|
|
@ -336,7 +336,7 @@ hooks:
|
||||||
# before_backup:
|
# before_backup:
|
||||||
# - echo "Starting a backup."
|
# - echo "Starting a backup."
|
||||||
before_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
|
# List of one or more shell commands or scripts to execute
|
||||||
# before pruning, run once per configuration file.
|
# before pruning, run once per configuration file.
|
||||||
|
@ -358,7 +358,7 @@ hooks:
|
||||||
# after_backup:
|
# after_backup:
|
||||||
# - echo "Finished a backup."
|
# - echo "Finished a backup."
|
||||||
after_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
|
# List of one or more shell commands or scripts to execute
|
||||||
# after pruning, run once per configuration file.
|
# after pruning, run once per configuration file.
|
||||||
|
|
Loading…
Reference in a new issue