#!/bin/bash
set -x today=`date +%Y%m%d%H%M` mkdir -p /data/backup/mysql/$today /usr/local/mysql-5.1.60/bin/mysqldump -uroot -p'passwd' -h127.0.0.1 --master-data=2 --all-database > /data/backup/mysql/$today/backupdb.sql 50 1 * * * /data/shell/mysqlback.sh