Send email on backup error from command line

Guys, is it possible to send and an email on error from the command line. I know this functionality exists in the Scheduled section of the backups page. I don't see email options on the command line.

If not any ideas on how to get notification of failure on command line backups.

-- Craig



Do you mean when using the virtualmin backup-domains shell API command? There's no way to have this send an email on failure, sorry.. however, you could call it from your own shell script that sends email.

For example, via a command like :

virtualmin backup-domain --domain --all-features --dest /backup --newformat >/tmp/backup.out || mail -s "backup failed" </tmp/backup.out

Ok I'll give it a try - Thanks!