定时任务自动备份mysql 数据库脚本 #!/bin/bash currDateStr=`date +%Y%m%d` mysqlBackFileName=ddy_${currDateStr} mysqldump -u database-user-name -p your-database-name --password=yourpassword | gzip > /var/backups/$mysqlBackFileName.sql.gz
30 1 * * * root sh /your-path/cronDayBackupMySQL.sh
|