Commit 2755bba0 authored by qa_quantgroup's avatar qa_quantgroup

增加打印

parent 2ce40e1d
......@@ -70,7 +70,7 @@ function db_schema_sync()
echo "mkdir $db_backup_sub_folders"
mkdir $db_backup_sub_folders
echo "Step 1: generate_config_file: $config_file_name"
echo "--- Step 1: generate_config_file: $config_file_name ---"
echo "source infos: $source_db_host $source_db_user"
echo "target infos: $target_db_host $target_db_user"
echo "database_name is : $sync_db_name"
......@@ -78,18 +78,18 @@ function db_schema_sync()
sh $work_dir/db_gen_config.sh $source_db_host $source_db_user $source_db_pwd $target_db_host $target_db_user $target_db_pwd $database $config_file_name $db_backup_sub_folders
echo "Step 2: replace domain name in tables: $database $mysql_host $db_backup_sub_folders"
echo "Step 2.1: is re_replace_ip: $re_replace_ip"
echo "--- Step 2: replace domain name in tables: $database $mysql_host $db_backup_sub_folders ---"
echo "--- Step 2: is re_replace_ip: $re_replace_ip ---"
sh $work_dir/db_replace_ip.sh $database $target_db_host $db_backup_sub_folders $re_replace_ip $ip_value
echo "Step 3: import basic data from backup file: $database $mysql_host $db_backup_sub_folders"
echo "--- Step 3: import basic data from backup file: $database $mysql_host $db_backup_sub_folders ---"
sh $work_dir/db_import.sh $database $target_db_host $db_backup_sub_folders $delete_business_data
if [ $? != 0 ];then
echo "db_import.sh error"
exit -1
fi
echo "Step 4: sync schema: $database $target_db_host"
echo "--- Step 4: sync schema: $database $target_db_host ---"
sync_cmd="mss -conf ${config_file_name} -sync"
echo "${sync_cmd}"
$sync_cmd
......@@ -110,9 +110,9 @@ then
for db_name in $database_list
do
echo "----------------------------------------------------"
echo "--- start sync db_name---"
echo "--- start sync $db_name---"
db_schema_sync $db_name
echo "--- end sync db_name---"
echo "--- end sync $db_name---"
echo "----------------------------------------------------"
done
echo $run_sql_file
......
......@@ -4,7 +4,7 @@ grep "Got error: 104" log
if [ $? = 0 ];then
exit -1
fi
grep "doesn't exist" log
grep "EXEC_SQL_FAIELD Error 1813" log
if [ $? = 0 ];then
exit -1
fi
......
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