2020-09-07 15:31:09 +08:00

65 lines
3.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.66
python wjtx_global_tools.py -m maintain -s 252-265
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_263 >legend_263.sql
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_264 >legend_264.sql
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_265 >legend_265.sql
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_252 >legend_252.sql
python wjtx_tools.py -t initdb -s 252
mysql -uroot -p0usmUwROtWjf -h10.10.6.2 legend_252 -e"source all.sql"
python import_redis.py 10.10.6.66 6382 out/game_redis.script
python import_redis.py 10.10.6.4 6379 out/global_redis.script
====================================================step 1===============================================
10.10.6.73
python wjtx_global_tools.py -m maintain -s 266-269
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_266 >legend_266.sql
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_267 >legend_267.sql
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_268 >legend_268.sql
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_269 >legend_269.sql
python wjtx_tools.py -t initdb -s 266
mysql -uroot -p0usmUwROtWjf -h10.10.6.2 legend_266 -e"source all.sql"
python import_redis.py 10.10.6.73 6382 out/game_redis.script
python import_redis.py 10.10.6.4 6379 out/global_redis.script
====================================================step 1===============================================
10.10.6.214
python wjtx_global_tools.py -m maintain -s 5028-5031
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_5028 >legend_5028.sql
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_5029 >legend_5029.sql
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_5030 >legend_5030.sql
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_5031 >legend_5031.sql
python wjtx_tools.py -t initdb -s 5028
mysql -uroot -p0usmUwROtWjf -h10.10.6.2 legend_5028 -e"source all.sql"
python import_redis.py 10.10.6.214 6382 out/game_redis.script
python import_redis.py 10.10.6.4 6379 out/global_redis.script