source ~/.bash_profile

backup_path=/data/backup/mysql-backup

file_dirname=${backup_path}/$(date +"%Y-%m")/$(date +"%d")

mkdir -p ${file_dirname}

file_name_库名="库名_"$(date +%Y-%m-%d-%T)".sql.gz"

/usr/bin/mysqldump -uroot -ppassword -h host --databases 库名 |gzip -c > ${file_dirname}/${file_name_JiuYangPErp}