Plan templates and hook scripts
Plan templates
Section titled “Plan templates”-
Open a plan you like and choose Save as template
-
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.
-
Review and enable each new plan
Database sources that do not exist on a server are left out and reported.
Hook scripts
Section titled “Hook scripts”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.
-
Open Admin › Hook scripts and click New hook
-
Name it and choose the Plan, When and Where
-
Write the Script
#!/bin/bashruns it with bash, anything else with sh. It runs as the backup user. Pass secrets as variables - never write them in the script. -
Set the Time limit and If it fails (stop the run or carry on)
-
Save - then ask a colleague to approve it