Commit bdfcca51 authored by tong.li's avatar tong.li

4.96

parent 3ac224c1
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
set -u set -u
source ~/.profile source ~/.profile
work_dir=/home/qa-deploy-utils/db-utils work_dir=/home/qa-deploy-utils/db-utils
sync_config_folder=/home/db_sync_configs sync_config_folder=/home/quant_group/db_sync_configs
db_backup_folder=/home/daily_db_backup db_backup_folder=/home/quant_group/daily_db_backup
source_db_host=$1 source_db_host=$1
source_db_user=`curl -s http://192.168.4.3:10088/config_server/get_db_config/xyqb/username` source_db_user=`curl -s http://192.168.4.3:10088/config_server/get_db_config/xyqb/username`
...@@ -26,6 +26,7 @@ function db_schema_sync() ...@@ -26,6 +26,7 @@ function db_schema_sync()
echo "mkdir -p $db_backup_sub_folders" echo "mkdir -p $db_backup_sub_folders"
mkdir -p $db_backup_sub_folders mkdir -p $db_backup_sub_folders
mkdir -p $sync_config_folder
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 "source infos: $source_db_host $source_db_user"
......
...@@ -23,13 +23,14 @@ config_file_name=$8 ...@@ -23,13 +23,14 @@ config_file_name=$8
db_backup_sub_folders=$9 db_backup_sub_folders=$9
use_cache=${10} use_cache=${10}
target_db_port=${11} target_db_port=${11}
mkdir -p db_backup_sub_folders
port="" port=""
sys_table_list="" sys_table_list=""
sync_config_folder=~/db_sync_configs sync_config_folder=~/db_sync_configs
base_config_file=$work_dir/config/base_config.json base_config_file=$work_dir/config/base_config.json
cache_dir=/home/daily_db_backup cache_dir=/home/quant_group/daily_db_backup
# if [ $# -ne 9 ]; then # if [ $# -ne 9 ]; then
# echo "db_gen_config.sh" # echo "db_gen_config.sh"
......
...@@ -26,8 +26,8 @@ if [ $# -ne 11 ]; then ...@@ -26,8 +26,8 @@ if [ $# -ne 11 ]; then
fi fi
work_dir=/home/qa-deploy-utils/db-utils work_dir=/home/qa-deploy-utils/db-utils
sync_config_folder=/home/db_sync_configs sync_config_folder=/home/quant_group/db_sync_configs
db_backup_folder=/home/db_backups db_backup_folder=/home/quant_group/db_backups
source_db_host=$1 source_db_host=$1
source_db_user=`curl -s http://192.168.4.3:10088/config_server/get_db_config/xyqb/username` source_db_user=`curl -s http://192.168.4.3:10088/config_server/get_db_config/xyqb/username`
......
find /home/db_sync_configs/* -ctime 0.3 -exec rm -rf {} \; find /home/quant_group/db_sync_configs/* -ctime 0.3 -exec rm -rf {} \;
find /home/db_backups/* -ctime 0.3 -exec rm -rf {} \; find /home/quant_group/db_backups/* -ctime 0.3 -exec rm -rf {} \;
\ No newline at end of file
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