NOTICE: This Documentation is for JetBackup 4 for Linux.

Please CLICK HERE for the latest JetBackup 5 for Linux Documentation.

Create New Hook

You can add a hook to run your script before/after an action.
To create new hook navigate to: "Hooks" and Click on "Create New Hook".

Hook Page


Example configuration page for hooks:

Create New Hook

Example script that writes into logfile the time that the action was created:

Hook Name

This will be used internally your convenience.

Hook Position

Choose to run your script Pre/Post your action.

Hook Type

The hook type defines on which action the hook should be executed.

Each hook type receives a different set of parameters by stdin.
Your script can read this data and use it to its own needs.

Those are the available action type and the parameters returns for each:

Hook Script

The hook script must be an executable file specified by full path.
For example:
/hooks/pre-backup.sh
If it's not an executable script, such as regular PHP file you should specify the executable to run your script.
For example:
/usr/bin/php /hooks/pre-backup.php
This executable should exit with success (0) if it executed successfully,
Otherwise, if it fails, it should exit with an error code - other than 0.