#!/bin/sh

_mysqldump="/usr/local/bin/mysqldump"
_gzip="/usr/bin/gzip -9"
_date="/bin/date"
_log="/var/log/mysqlbackup.log"

date=`${_date} +'%d%m%y-%H%M'`
date_log=`${_date} +'%d%m%y %H:%M:%S'`
echo "Backup start ${date_log}" >> ${_log}
${_mysqldump} zabbix | ${_gzip} > /kerya3/backups/mysql/zabbix-${date}.sql.gz
date_log=`${_date} +'%d%m%y %H:%M:%S'`
echo "Backup end ${date_log}" >> ${_log}