mirror of
https://github.com/zrepl/zrepl.git
synced 2025-04-02 20:16:45 +02:00
docs: snapshotting: command hook type: not the only hook type anymore
This commit is contained in:
parent
84eefa57bc
commit
ffe677e55a
@ -113,14 +113,11 @@ Most hook types take additional parameters, please refer to the respective subse
|
|||||||
...
|
...
|
||||||
|
|
||||||
|
|
||||||
The hook type ``command`` is the only currently supported hook type.
|
``command`` hooks take a ``path`` to an executable script or binary to be executed before and after the snapshot.
|
||||||
Future versions of zrepl may support other hook types.
|
``path`` must be absolute (e.g. ``/etc/zrepl/hooks/zrepl-notify.sh``).
|
||||||
The ``path`` to the hook executables must be absolute (e.g. ``/etc/zrepl/hooks/zrepl-notify.sh``).
|
|
||||||
No arguments may be specified; create a wrapper script if zrepl must call an executable that requires arguments.
|
No arguments may be specified; create a wrapper script if zrepl must call an executable that requires arguments.
|
||||||
zrepl will call the hook both before and after the snapshot, but with different values of the ``ZREPL_HOOKTYPE`` environment variable; see below.
|
|
||||||
The process standard output is logged at level INFO. Standard error is logged at level WARN.
|
The process standard output is logged at level INFO. Standard error is logged at level WARN.
|
||||||
|
The following environment variables are set:
|
||||||
zrepl sets a number of environment variables for the hook processes:
|
|
||||||
|
|
||||||
* ``ZREPL_HOOKTYPE``: either "pre_snapshot" or "post_snapshot"
|
* ``ZREPL_HOOKTYPE``: either "pre_snapshot" or "post_snapshot"
|
||||||
* ``ZREPL_FS``: the ZFS filesystem name being snapshotted
|
* ``ZREPL_FS``: the ZFS filesystem name being snapshotted
|
||||||
|
Loading…
Reference in New Issue
Block a user