I had some questions that I didnt see in the guide.
Do the post run scripts depend or know about the status of the backups? Or does say the post-backup script run regardless of the backup being successful or not with no notification of success or failure?
When running as cron, do the exit codes also reflect true success or failure, eg exit 0 only if all VMs backed up successfully?
My goal/hope is to use healthchecks.io to make sure the cron is running successfully and the backups are completing successfully, but that would mean I need some way of only executing wget when the backup was successful.
@thedge How is this working for you? Could you possibly share your script or detail on how you are using healthchecks.io to monitor the cronjob? Much appreciated…
Sign up for a healthchecks.io account, there is a free tier.
Create a check. You can use Cron schedule or the regular, but the regular can cause false failures if you run your job manually sometimes as the next day will be out of order.
Itll give you a ping URL that is unique to your check, like this but longer. https://hc-ping.com/a184
You set a job period that matches your Vertical schedule (ex 1 day) and a grace period of a bit longer than your backup takes. If the post-backup script doesnt run inside that schedule+grace period then you get alerted.
On your server running Vertical, create a file “post-backup” (no extension) with the below in it and make it executable (chmod +x). It goes in the .verticalbackup/scripts folder.
Note that the version of wget on most ESXi versions does NOT support SSL but thankfully Healthchecks has an http endpoint that works with the same URL they give you.
You can also create a pre-backup script that tells Healthchecks that you are starting the job, same URL with /start on the end.
@thedge amazing! thank you so much, got it working - this is the missing piece to VB that will let me sleep at night… P.S. yeah Pushover is great, I use it too!