- Pre command: after an upload has arrived and passed its checksum, before Central stores it. Central waits for it to finish.
- Post command: after storage succeeds, or when storing a new archive fails. Earlier failures, such as a checksum mismatch, do not run the post command. Retrying a completed upload does not rerun hooks.
Set up
1
Open Custom Scripts
In Central, click Custom Scripts.
2
Upload a script (optional)
Under Uploaded Items, upload up to 3 files. Only
.sh scripts and .txt helper files are allowed, and they must be UTF-8 text. .sh files are made executable, and Windows line endings are converted.3
Set the commands
Enter a Pre Command and/or Post Command. Either:
- the name of an uploaded script, such as
after-upload.sh, or - any shell command, such as
curl -fsS https://hc-ping.com/your-id.
sh -c inside the Central container, from the hook scripts folder (/hook-scripts). Each command has a 5-minute timeout. Output and non-zero exit codes are written to Central’s logs; a failing hook doesn’t stop the upload.
Environment variables
Every hook gets these variables:
The post command also gets:
Example: log each stored snapshot
after-upload.sh
after-upload.sh.
The Central image is a minimal Alpine image with
sh and curl. Tools like rclone aren’t included; run those on the host or in another container that reads the same backup folder.