Is it possible to change the Backup Module in a way that it only sends an email if the backup fails?
There is a feature request for this but not currently. It is on the to-do list for a future release. As with all bugs/feature request patches are always welcome
Hi James, thanks for the answer. Is it possible to create a backup via cli / bash? then i could parse the output myself and swallow all unwanted messages.
Agreed. I donât need to know when a backup process does its job properly, I need to know when it failed.
For now, your best bet would be a well crafted email filter to just delete the âsuccessâ messages.
Agreed +1
All these backup emails are irritating. Its tempting to add an email filter and send them directly to /dev/null.
Iâd be perfectly happy to drop the email confirmations altogether, and keep the informationals in the usual logs.
In general help you are, so you can generally :-
crontab -e -u asterisk
to edit the cron jobs for the user asterisk, post-pend â> /dev/null 2>&1â to the end of any job that irritates you, if the cron job doesnât write anything to /dev/stdout or /dev/stderr there will be no email and that post-pend will guarantee that it doesnât irritate you, itâs just how cron jobs work, BUT if you donât monitor otherwise, you will never know . . . failed processes generally write to /dev/stderr (which is 2 here) so if you just want just errors and not stdout leave out the 2 redirection > /dev/null directly and use â2>&1 >/dev/nullâ
man crontab
edit: perhaps I didnât show redirection properly, perhaps start with
This feature was implemented a while back. There is a toggle in the backup settings to set it to email on error only.
Weâre still using FreePBX 12.0.76.3 and canât find this feature toggle.
Do I need to search harder in v 12, or schedule upgrade to v 13 ?
Or use simple crontab adjustment per dicko above.
More thanks
Itâs an obviously visible checkbox in freepbx13. i am pretty sure it wasnât there in freepbx12.
The crontab is generated. This must have been 13+. You can use email filters if you do not wish to upgrade
Is it possible to add a Subject Line? as we have a few setups sending from the same email address, and itâs just impossible to know which box sent the failure email.
Thanks
Not at present, but you could request the feature at http://issues.freepbx.org/