定时备份
dirname=`date +%Y-%m-%d_%H-%M`
[ -z $dirname ] && (echo "目录存在";echo 1) || (echo "目录不存在";echo 2;mkdir $dirname)

for name in `echo cacti jacky`
do
    echo $name
    mysqldump -h somehost -u someuser -psomepassword $name > $dirname/$name.sql
done
Copyright © opschina.org 2017 with zzlyzq@gmail.com all right reserved,powered by Gitbook该文件修订时间: 2017-07-11 11:32:48

results matching ""

    No results matching ""