#!/bin/bash
mysql=“mysql -uroot -p1234”
bei=\”mysqldump -uroot -p1234 \”
ku=
$mysql -e \"show databases;\"|sed 1d|egrep -v \"schema|mysql|test\"
for shu in kudobiao=‘kudo biao=`kudobiao=‘mysql -e “show tables from $ku;”|sed 1d`
for tables in biaodomkdir−p/opt/biaodo mkdir -p /opt/biaodomkdir−p/opt/(date +%F)
$bei $shu tables>/opt/tables >/opt/tables>/opt/(date +%F)/KaTeX parse error: Expected group after \’_\’ at position 4: shu_̲tables.sql
done
done
定时任务
yum -y install crontab
编辑任务
crontab -e