2020-12-15 10:57:15 +08:00

65 lines
3.6 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.86 88
python wjtx.py change_server_status -g 1009 -m maintain -o add -s 291-300
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_291 >legend_291.sql
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_295 >legend_295.sql
python wjtx.py init_wjtx_mysql -g 1009 -s 291
mysql -uroot -p0usmUwROtWjf -h10.10.6.2 legend_291 -e"source all.sql"
python import_redis.py 10.10.6.86 6381 out/game_redis.script
python import_redis.py 10.10.6.4 6379 out/global_redis.script
python wjtx.py change_server_status -g 1009 -m maintain -o remove -s 291-300
====================================================step 2===============================================
10.10.6.90-91
python wjtx.py change_server_status -g 1009 -m maintain -o add -s 301-304
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_301 >legend_301.sql
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_302 >legend_302.sql
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_303 >legend_303.sql
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_304 >legend_304.sql
python wjtx.py init_wjtx_mysql -g 1009 -s 301
mysql -uroot -p0usmUwROtWjf -h10.10.6.2 legend_301 -e"source all.sql"
python import_redis.py 10.10.6.90 6381 out/game_redis.script
python import_redis.py 10.10.6.4 6379 out/global_redis.script
python wjtx.py change_server_status -g 1009 -m maintain -o remove -s 301-304
====================================================1217==--=============================================
10.10.6.91-92
python wjtx.py change_server_status -g 1009 -m maintain -o add -s 305-309
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_305 >legend_305.sql
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_306 >legend_306.sql
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_307 >legend_307.sql
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_308 >legend_308.sql
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_309 >legend_309.sql
python wjtx.py init_wjtx_mysql -g 1009 -s 305
mysql -uroot -p0usmUwROtWjf -h10.10.6.2 legend_305 -e"source all.sql"
python import_redis.py 10.10.6.91 6382 out/game_redis.script
python import_redis.py 10.10.6.4 6379 out/global_redis.script
python wjtx.py change_server_status -g 1009 -m maintain -o remove -s 305-309