Backup Email on Failure

If I set virtualmin to email when a backup fails, it emails when the backup IS successful but the command to run after the backup (in my case an rsync bash script) generates errors. the output of this bash scripts turns out to be a 30Mb email, this gets quite annoying.

since in reality they are two separate errors, is it possible to set to include (or not) the error with the post-backup action?

TIA

Howdy,

There isn’t currently a way to do that… however, what you could do is make sure that the backup script returns success, even if an error occurred while the script was running.

You can do that by ending your script with this line:

exit 0

You could also tweak your bash script to output less information, but I suspect just changing the exit code will do what you’re after.

-Eric