make a script after successful backup

rjcab

Member
Mar 1, 2021
50
0
11
44
Hello,

I would like to make a simple script which check the daily backups and send notification to my home automation system (jeedom)

I've check the below link but a bit complicated
https://github.com/robhost/proxmox-scripts/blob/master/vzdump_hook.sh

I thought to use and browse mailbox after sending email once backup is done but a bit heavy.
I've checked and I should do this:

Code:
nano /usr/local/bin/vzdump-hook-script
and add something like :

Code:
#!/bin/bash

if [ "$1" == "job-end" ]; then
curl -X PUT "http://192.168.1.12/core/api/jeeApi.php?plugin=virtual&type=event&apikey=vvvvxcvdffergergetynbersyhe&id=10439&value=1"
fi

exit 0
curl -X PUT "http://192.168.1.12/core/api/jeeApi.php?plugin=virtual&type=event&apikey=vvvvxcvdffergergetynbersyhe&id=10439&value=0"

then

Code:
chmod +x /usr/local/bin/vzdump-hook-script
nano /etc/pve/jobs.cfg

add this entry at the bottom of your config file:

Code:
script /usr/local/bin/vzdump-hook-script

But you know what, it doesn't work :p
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!