Commit 8e34985a authored by tywldx's avatar tywldx

test

parent 304b839d
...@@ -3,7 +3,7 @@ dbs=`curl http://192.168.4.3:10088/config_server/get_db_config/all/name` ...@@ -3,7 +3,7 @@ dbs=`curl http://192.168.4.3:10088/config_server/get_db_config/all/name`
for db in $dbs for db in $dbs
do do
sql_command=`curl http://192.168.4.3:10088/config_server/get_db_dump_command/${db}/opt` sql_command=`curl http://192.168.4.3:10088/config_server/get_db_dump_command/${db}/opt`
table_opt="mysqldump $sql_command --opt > /tmp/${db}_opt.sql" table_opt="mysqldump --opt $sql_command > /tmp/${db}_opt.sql"
echo "$table_opt" echo "$table_opt"
eval $table_opt eval $table_opt
mysql -h 192.168.6.2 -P 3306 -uqa -pqatest db < /tmp/${db}_opt.sql mysql -h 192.168.6.2 -P 3306 -uqa -pqatest db < /tmp/${db}_opt.sql
......
...@@ -60,7 +60,7 @@ module.exports = { ...@@ -60,7 +60,7 @@ module.exports = {
}, },
get_mysql_dump_opt:function(key){ get_mysql_dump_opt:function(key){
let item = this.dbs[key]; let item = this.dbs[key];
return `--host=${item.host} --port=${item.port} --user=${item.user} --password='${item.pwd}' ${key} ` return `--host=${item.host} --port=${item.port} --user=${item.user} --password='${item.pwd}' -d ${key} `
}, },
get_mysql_dump_table:function(key){ get_mysql_dump_table:function(key){
let item = this.dbs[key]; let item = this.dbs[key];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment