案例一:shell+cron实现MySQL自动备份且自动删除N天前备份 代码如下:#!/bin/shDUMP=/usr/local/mysql/bin/mysqldumpOUT_DIR=/home/ldl/xxx/backup/LINUX_USER=ldl
DB_NAME=ldlDB_USER=ldlDB_PASS=xxx#How much days backup mostDAYS=1
#Core of scr iptcd $OUT_DIRDATE=`date +%Y_%m_%d`OUT_SQL