数据库|mysql教程
数据库
数据库-mysql教程
.net网站源码怎么安装,ubuntu有多个显卡,tomcat打开是什么样子的,爬虫uvb和led,php程序设计教程视频学习,seo的altlzw
同步数据库自动化脚本
java源码修改,vscode编辑latex,ubuntu单词,web配置tomcat,sqlite平均标准差,免费的网络验证系统插件,前端三大框架是干嘛的,爬虫分析系统设计与实现,php hhvm,网站seo方案方案,婚庆 网站模板,填报系统网页模板,iis 织梦 修改模板403lzw
#!/bin/sh
php移动端源码,ubuntu系统切换win,利用python爬虫赚钱,php 空格 ” ,谷歌seo入口lzw
read -p “Please keyin your ssh host:” -t 30 host_ip
read -p “Please keyin your ssh user:” -t 30 username
read -p “Please keyin your ssh pass:” -t 30 password
read -p “Please keyin your sync table list,separated by spaces:” -t 30 table_list
datetime=`date +%Y%m%d%H%M%S`
src_file=”/tmp/data_$datetime.sql”
tar_file=”/tmp/data_$datetime.tar.gz”
mysqldump -h127.0.0.1 -uroot -ppass database_name $table_list > $src_file
tar czvf $tar_file $src_file
./expect_scp.sh $host_ip $username $password $tar_file
expect_scp.sh代码
#!/tools/bin/expect
set timeout 10
set host [lindex $argv 0]
set username [lindex $argv 1]
set password [lindex $argv 2]
set src_file [lindex $argv 3]
#set dest_file [lindex $argv 4]
spawn scp $src_file $username@$host:/home/$username
expect {
“(yes/no)?”
{
send “yes/n”
expect “*assword:” { send “$password/n”}
}
“*assword:”
{
send “$password/n”
}
}
expect “100%”
expect eof
如果觉得《同步数据库自动化脚本【MySQL】》对你有帮助,请点赞、收藏,并留下你的观点哦!