2020-11-03 12:04:58 +08:00

83 lines
4.4 KiB
Plaintext

combine setp:
1、maintain server
cd /data/git/dev_ops/wjtx_tools/ops_tools
python wjtx_global_tools.py -m maintain -s 1-3
2、 close auto load in ops:
3、stop service && backup redis && backup mysql
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_241 >legend_241.sql
4、run scripts
cd /root/opensource/migrate_server/wjtx/tools/combine_db/script
python combine_db.py
python combine_redis.py
drop database
cd /data/git/dev_ops/wjtx_tools/ops_tools && python wjtx_tools.py -t initdb -s 2008
cd /root/opensource/migrate_server/wjtx/tools/combine_db/script/out
mysql -uroot -p0usmUwROtWjf -h10.10.6.2 legend_237 -e"source all.sql"
cd ..
python import_redis.py 10.10.6.59 6381 out/game_redis.script
python import_redis.py 10.10.6.4 6379 out/global_redis.script
5、start service && change service to open && autoload
python wjtx_global_tools.py -m open -s 1-3
cd /data/git/dev_ops/wjtx_tools/ops_tools && python wjtx_tools.py -t autoload
====================================================step 1===============================================
10.10.6.59 66
python wjtx_global_tools.py -m maintain -s 237-265 -a add
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_237 >legend_237.sql
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_252 >legend_252.sql
python wjtx_tools.py -t initdb -s 237
mysql -uroot -p0usmUwROtWjf -h10.10.6.2 legend_237 -e"source all.sql"
python import_redis.py 10.10.6.59 6381 out/game_redis.script
python import_redis.py 10.10.6.4 6379 out/global_redis.script
python wjtx_global_tools.py -m maintain -s 237-265 -a remove
====================================================step 1===============================================
10.10.6.83-85
python wjtx_global_tools.py -m maintain -s 286-290 -a add
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_286 >legend_286.sql
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_287 >legend_287.sql
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_288 >legend_288.sql
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_289 >legend_289.sql
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_290 >legend_290.sql
python wjtx_tools.py -t initdb -s 286
mysql -uroot -p0usmUwROtWjf -h10.10.6.2 legend_286 -e"source all.sql"
python import_redis.py 10.10.6.83 6382 out/game_redis.script
python import_redis.py 10.10.6.4 6379 out/global_redis.script
python wjtx_global_tools.py -m maintain -s 286-290 -a remove
====================================================step 1===============================================
10.10.6.218-220
python wjtx_global_tools.py -m maintain -s 5036-5039 -a add
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_5036 >legend_5036.sql
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_5037 >legend_5037.sql
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_5038 >legend_5038.sql
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_5039 >legend_5039.sql
python wjtx_tools.py -t initdb -s 5036
mysql -uroot -p0usmUwROtWjf -h10.10.6.2 legend_5036 -e"source all.sql"
python import_redis.py 10.10.6.218 6382 out/game_redis.script
python import_redis.py 10.10.6.4 6379 out/global_redis.script
python wjtx_global_tools.py -m maintain -s 5036-5039 -a remove
====================================================game1012===============================================
10.10.6.20-21
python wjtx_global_tools.py -m maintain -s 20001-20004 -a add
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_20001 >legend_20001.sql
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_20002 >legend_20002.sql
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_20003 >legend_20003.sql
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_20004 >legend_20004.sql
python wjtx_tools.py -t initdb -s 20001
mysql -uroot -p0usmUwROtWjf -h10.10.6.2 legend_20001 -e"source all.sql"
python import_redis.py 10.10.6.20 6381 out/game_redis.script
python import_redis.py 10.10.6.6 6379 out/global_redis.script
python wjtx_global_tools.py -m maintain -s 20001-20004 -a remove