- Pre command: after the upload passes its checksum, before Station stores it. Station waits for it to finish.
- Post command: after storing, with
THREETOONEGO_STATUSset tookorerror. Retrying an upload that already finished doesn’t rerun hooks.
Set up
Follow the shared custom-script setup for uploading files, configuring independent PRE and POST commands, execution limits, and secret handling.Environment variables
Use shell variables such as$THREETOONEGO_JOB_NAME in commands and scripts. The {{ job_name }} syntax applies to HTTP message and JSON templates, and is not expanded in shell scripts.
Every hook gets these variables:
The post command also gets:
Example: write a snapshot receipt
after-upload.sh
after-upload.sh. This script manages its own log; keep it private and arrange rotation on the host.
The Station 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.