@ts678 OMG THANK YOU THANK YOU TAHNK YOU =) It’s working =) I’m very happy with the result =) Here is the step by step guide =):
1) Install docker and the aprise appi with the following config
version: '3.3'
services:
apprise:
image: caronc/apprise:latest
version: '3.3'
services:
duplicati:
image: linuxserver/duplicati:latest
environment:
PGID: '0'
PUID: '0'
TZ: Europe/Vienna
ports:
- 8200:8200
volumes:
- somevolume/config
- backupvolume/backup
- sourcevolume/source
2) Write a script for the aprise api (thanks to ts678 and all his effort getting this going) =)
#!/bin/bash
curl -s -X POST -d "{\"urls\":\"tgram://apikey/chatid/\", \"body\":\"${DUPLICATI__PARSED_RESULT} with ${DUPLICATI__OPERATIONNAME}, Backupname: ${DUPLICATI__backup_name}\", \"title\":\"Duplicati_Rancher_Home\"}" -H "Content-Type: application/json" http://apprise:8000/notify
exit 0
you can adjust the url to your notification-needs with this guide: Home · caronc/apprise Wiki · GitHub
so you can choose any notification you want! Be carefull with the json format…it’s very sensitive!
Just include exit 0 so duplicati doesn’t complain about exiting with error 255
3) Upload the script to /config/scripts directory INSIDE the linuxserver/duplicati docker-container
(If you scripted it on windows, install dos2unix (on wsl or on another unix machine) first, and convert the file before uploading!) use the following command:
dos2unix [nameofscript]
after uploading, set the script executable INSIDE the container:
docker exec duplicati chmod +x /conf/scripts/nameofscript
4) Specify a Backupjob with the following advanced options:
--run-script-after=/config/scripts/nameofscript
you can also specify it globally under the settings page, and set the advanced option there. If you do this, it’s applied to all your jobs.
5) ENJOY =)
Thanks again to @ts678 who putted a lot of effort in this =) and saarg from linuxserver/duplicati who helped here: Setup a --run-script-after in duplicati - Container Support - LinuxServer.io