I finally set up a realistic backup schedule on my data through a shell script, which are handled by cron on tight intervals. Unfortunately, I keep getting empty emails each time the CRON has been executed and not only when things go wrong.
Is it possible to only make CRON send emails when something goes wrong, ie. my TAR doesn't execute as intended?
Here's how my crontab is setup for the moment;
0 */2 * * * /bin/backup.sh 2>&1 | mail -s "Backup status" email@example.com
Thanks a lot!