Skip to content

Plan templates and hook scripts

5 min · Screen: /admin/hooks · Needs: Permissions.Hooks.Manage

  1. Open a plan you like and choose Save as template

  2. Open Backups › Plan templates and click Apply to servers

    Pick servers - or a tag - and the template makes one disabled plan per server, checked against each server’s environment rules.

  3. Review and enable each new plan

    Database sources that do not exist on a server are left out and reported.

A hook is a script that runs on the server - or in a container - at one of four moments: Before the backup, After the backup, Before a restore, After a restore. Typical uses: stop a service, flush a cache, tell another system the result.

  1. Open Admin › Hook scripts and click New hook

  2. Name it and choose the Plan, When and Where

  3. Write the Script

    #!/bin/bash runs it with bash, anything else with sh. It runs as the backup user. Pass secrets as variables - never write them in the script.

  4. Set the Time limit and If it fails (stop the run or carry on)

  5. Save - then ask a colleague to approve it