tamil-wiki / mediawiki-backup-restore

Docker image for backup MySQL and Mediawiki config into S3
MIT License
0 stars 0 forks source link

send notification to webhook before, after backup #15

Open ithiru opened 2 years ago

ithiru commented 2 years ago

Can you send notification before/after with information like, total number of backups, size, etc., to Webhook, you can do curl to webhook (discord, for example).

vijayabharathib commented 1 year ago

Just figured out the base format. will try scripting it.

delete ➤ curl -X POST <url> \
-H 'Content-Type: application/json' \
-d '{"embeds":[{"color":"14365807","title":"cron","type":"rich","description":"Cron executed","fields":[{"name":"source","value":"db"},{"name":"time","value":"2022-10-06 12:00:00"},{"name":"status","value":"failed"},{"name":"size","value":"450MB"},{"name":"frequency","value":"hourly"}]}]}'

curl -X POST <url> \
-H 'Content-Type: application/json' \
-d '{"embeds":[{"color":"1226002","title":"cron","type":"rich","description":"Cron executed","fields":[{"name":"source","value":"db"},{"name":"time","value":"2022-10-06 12:00:00"},{"name":"status","value":"SUCCESS"},{"name":"size","value":"450MB"},{"name":"frequency","value":"hourly"}]}]}'