# Regular cron jobs for the ndn-mysql5X package

# refresh the tables every night (to help pacct'ing get a better picture of what is going on)
#0 23 * * * root /etc/init.d/mysqld refresh &> /dev/null

# To debug an entire mysql server:
# * * * * *	root	/dh/mysql/scripts/mysql.debug.logger.sh
# * * * * *	root	/dh/mysql/scripts/mysql.debug.logger.sh mysql_instance1 mysql_instance2 ...
# 
# To debug particular users
# * * * * * root /dh/mysql/scripts/mysql.proc.logger.sh mysql_instance user_database

# purge binlogs according to /dh/mysql/etc/binlog_purge/$service
# 52 */4 * * *    root    /dh/mysql/scripts/purge_binlogs.sh &> /dev/null

# expire backups
30 23 * * *     root    /dh/mysql/scripts/expire_backups.pl /mnt/backup/db /mnt/backup/db.nfs &> /dev/null

# check backups report
10 8 * * *      root    /dh/mysql/scripts/mysql.backup.check.pl &> /dev/null

# rotate and analyze log files
#0 */6 * * *     root    /dh/mysql/scripts/loganalyze.pl &> /dev/null

#0 */6 * * *		root	for i in /dh/mysql/logs/*.slow ; do echo -n "" > $i ; done

# rotate MySQL error, slow, general logs
0 0 * * *            root    /dh/mysql/scripts/mysql_logrotate.sh &> /dev/null

# run slow query digest
30 4 * * *            root    /dh/mysql/scripts/slow_query_digest.sh &> /dev/null

# run checksums on master dbs every Sunday
0 22 * * 0            root    /dh/mysql/scripts/mysql_checksum_master.sh &> /dev/null

# run xtrabackup on clones only
0 20 * * *            root /dh/mysql/scripts/mysql_xtrabackup_clone.sh &> /dev/null

# backup db users and privileges
30 19 * * *            root /dh/mysql/scripts/backup_dbuser_grants.sh &> /dev/null

