91 lines
5.2 KiB
Plaintext
91 lines
5.2 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
|
|
|
|
|
|
clear_mysql:
|
|
select count(1) FROM role WHERE login_time < '2020-11-01 00:00:00' AND total_rmb < 6 AND total_online_millis < 3600000 AND id not in (select role_id from role_marry)
|
|
select count(id) from item where role_id not in (select id from role)
|
|
select count(id) from role_mail where role_id not in (select id from role)
|
|
select count(id) FROM `tribe_member` WHERE role_id NOT IN ( SELECT id FROM role)
|
|
|
|
====================================================step 1===============================================
|
|
10.10.6.100-101
|
|
python wjtx.py change_server_status -g 1009 -m maintain -o add -s 324-327
|
|
|
|
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_324 >legend_324.sql
|
|
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_325 >legend_325.sql
|
|
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_326 >legend_326.sql
|
|
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_327 >legend_327.sql
|
|
|
|
python wjtx.py init_wjtx_mysql -g 1009 -s 324
|
|
mysql -uroot -p0usmUwROtWjf -h10.10.6.2 legend_324 -e"source all.sql"
|
|
python import_redis.py 10.10.6.100 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 324-327
|
|
====================================================step 2===============================================
|
|
10.10.6.59 81
|
|
python wjtx.py change_server_status -g 1009 -m maintain -o add -s 266-290
|
|
|
|
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_282 >legend_282.sql
|
|
|
|
python wjtx.py init_wjtx_mysql -g 1009 -s 266
|
|
mysql -uroot -p0usmUwROtWjf -h10.10.6.2 legend_266 -e"source all.sql"
|
|
python import_redis.py 10.10.6.45 6381 out/game_redis.script
|
|
change 266 config ->6.45
|
|
python import_redis.py 10.10.6.4 6379 out/global_redis.script
|
|
clear hefu_info 266 282
|
|
python wjtx.py change_server_status -g 1009 -m maintain -o remove -s 266-290
|
|
====================================================step 3===============================================
|
|
10.10.6.45 59
|
|
python wjtx.py change_server_status -g 1009 -m maintain -o add -s 210-265
|
|
|
|
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_210 >legend_210.sql
|
|
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_237 >legend_237.sql
|
|
|
|
python wjtx.py init_wjtx_mysql -g 1009 -s 210
|
|
mysql -uroot -p0usmUwROtWjf -h10.10.6.2 legend_210 -e"source all.sql"
|
|
python import_redis.py 10.10.6.45 6382 out/game_redis.script
|
|
python import_redis.py 10.10.6.4 6379 out/global_redis.script
|
|
clear hefu_info 210 237
|
|
python wjtx.py change_server_status -g 1009 -m maintain -o remove -s 210-265
|
|
====================================================step 4===============================================
|
|
10.10.6.203 218 222-224
|
|
python wjtx.py change_server_status -g 1009 -m maintain -o add -s 5005-5049
|
|
|
|
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_5005 >legend_5005.sql
|
|
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_5044 >legend_5044.sql
|
|
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_5045 >legend_5045.sql
|
|
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_5046 >legend_5046.sql
|
|
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_5047 >legend_5047.sql
|
|
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_5048 >legend_5048.sql
|
|
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_5049 >legend_5049.sql
|
|
|
|
python wjtx.py init_wjtx_mysql -g 1009 -s 5005
|
|
mysql -uroot -p0usmUwROtWjf -h10.10.6.2 legend_5005 -e"source all.sql"
|
|
python import_redis.py 10.10.6.203 6381 out/game_redis.script
|
|
python import_redis.py 10.10.6.4 6379 out/global_redis.script
|
|
clear hefu_info 5005 5036
|
|
python wjtx.py change_server_status -g 1009 -m maintain -o remove -s 5005-5049 |