mirror of
https://github.com/zrepl/zrepl.git
synced 2024-11-25 09:54:47 +01:00
729c83ee72
* stack-based execution model, documented in documentation * circbuf for capturing hook output * built-in hooks for postgres and mysql * refactor docs, too much info on the jobs page, too difficult to discover snapshotting & hooks Co-authored-by: Ross Williams <ross@ross-williams.net> Co-authored-by: Christian Schwarz <me@cschwarz.com> fixes #74
23 lines
358 B
Bash
23 lines
358 B
Bash
#!/usr/bin/env bash
|
|
set -e
|
|
|
|
[ "$ZREPL_DRYRUN" = "true" ] && DRYRUN="echo DRYRUN: "
|
|
|
|
pre_snapshot() {
|
|
$DRYRUN date
|
|
}
|
|
|
|
post_snapshot() {
|
|
$DRYRUN date
|
|
}
|
|
|
|
case "$ZREPL_HOOKTYPE" in
|
|
pre_snapshot|post_snapshot)
|
|
"$ZREPL_HOOKTYPE"
|
|
;;
|
|
*)
|
|
printf 'Unrecognized hook type: %s\n' "$ZREPL_HOOKTYPE"
|
|
exit 255
|
|
;;
|
|
esac
|