resticprofile
resticprofile copied to clipboard
Add backup duration variable to send-after hook
It would be super useful to have a variable that holds the time of how long the backup took in the senf-after and send-after-fail hooks. Maybe something like this with ${BACKUP_DURATION}?:
base:
backup:
send-after:
method: POST
url: https://example.com/message
body: "title=Profile ${PROFILE_NAME} ${PROFILE_COMMAND} success&message=Backup took: ${BACKUP_DURATION}"
headers:
- name: "Content-Type"
value: "application/x-www-form-urlencoded"
send-after-fail:
method: POST
url: https://example.com/message
body: "title=Profile ${PROFILE_NAME} ${PROFILE_COMMAND} failed&message=${ERROR}\n\n${ERROR_STDERR}\n\nTook: ${BACKUP_DURATION}"
headers:
- name: "Content-Type"
value: "application/x-www-form-urlencoded"
...