dockerized icon indicating copy to clipboard operation
dockerized copied to clipboard

E-Mail for each mysql-backup cronjob run

Open mibuthu opened this issue 4 years ago • 0 comments

I get an email every day with the result of the mysql backup cronjob run:

==> Backup completed successfully.
==> Detailed log (/var/vmail/backup/mysql/2021/12/14/2021-12-14-03-40-01.log):
=========================
* Starting backup: 2021-12-14-03-40-01.
* Backup directory: /var/vmail/backup/mysql/2021/12/14.
* Backing up databases: mysql vmail amavisd iredapd iredadmin roundcubemail sogo sa_bayes.
* File size:
----
12K	amavisd-2021-12-14-03-40-01.sql.bz2
8.0K	iredadmin-2021-12-14-03-40-01.sql.bz2
8.0K	iredapd-2021-12-14-03-40-01.sql.bz2
96K	mysql-2021-12-14-03-40-01.sql.bz2
4.0K	roundcubemail-2021-12-14-03-40-01.sql.bz2
460K	sa_bayes-2021-12-14-03-40-01.sql.bz2
8.0K	vmail-2021-12-14-03-40-01.sql.bz2
----
* Backup completed (Success? YES).

I my opinion there should be no email if the script completes successfully, so the script should have no output in this case. As the actual script output is reasonable for manual runs, probably adding a '-q' (quiet) arg to the backup_mysql.sh script would be the best solution.

mibuthu avatar Dec 14 '21 18:12 mibuthu