Dort kann mit Hilfe von user-callback Scripts die Funktion erweitert werden. Leider habe ich vom Scripten keine Ahnung und bitte nun um eure Hilfe.
Das Script, https://github.com/bit-team/user-callba ... k.sendmail interessiert mich besonders, es würde ein Mail bei Beendigung des Backups oder bei eventuellen Fehlern senden. Ich komm zwar so weit zu verstehen wo ich meine Mail Adresse eingeben muss, dennoch wird mir keine Mail gesendet. Das lässt mich darauf schließen dass noch weitere Konfigurationen notwendig sind, leider weiß ich nicht wo anfangen. Brauchbare Informationen dazu habe ich im Netz leider keine gefunden.
Code: Alles auswählen
email="foo@bar"
profile_id="$1"
profile_name="$2"
reason="$3"
errorcode="$4"
function send_mail {
subject="Backintime $profile_name: $1"
shift
echo -e "$(date) \n$@" #| mail -s $subject $email
}
function log_id {
if [ $profile_id -gt 1 ]; then
echo $profile_id
else
echo ""
fi
}
case $reason in
1) send_mail "Backup process begins"
;;
2) send_mail "Backup process ends" "$(cat ~/.local/share/backintime/takesnapshot_$(log_id).log)"
;;
3) send_mail "A new snapshot was taken"
;;
4) #There was an error
case $errorcode in
1) send_mail "ERROR" "The application is not configured"
;;
2) send_mail "ERROR" "A 'take snapshot' process is already running"
;;
3) send_mail "ERROR" "Can't find snapshots folder (is it on a removable drive ?)"
;;
4) send_mail "ERROR" "A snapshot for 'now' already exist"
;;
esac
;;
esac
Code: Alles auswählen
echo "Testing Postfix email delivery" | mail -s "Test email" john@gmail.com