new combine in 20220407

This commit is contained in:
pengtao 2022-04-06 16:57:18 +08:00
parent 4e3c088c89
commit afc77d5135
5 changed files with 55 additions and 41 deletions

2
.gitignore vendored
View File

@ -23,3 +23,5 @@ legend-admin/guns/trunk/guns-admin/1/guns.sql
*.7z *.7z
*.csv *.csv
server_list.json server_list.json
.vscode/settings.json
tools/combine_db/.vscode/settings.json

View File

@ -1,43 +1,45 @@
========================================check combine data========================================= ========================================check combine data=========================================
mysql -uroot -p0usmUwROtWjf -h10.10.6.2 legend_776 -e"select count(1),server_id from user group by server_id;" mysql -uroot -p0usmUwROtWjf -h10.10.6.2 legend_780 -e"select count(1),server_id from user group by server_id;"
==========================================step 1=============================================== ==========================================step 1===============================================
10.10.6.169-170 10.10.6.171-172
python wjtx.py changestatus -m maintain -o add -s 776-779 python wjtx.py changestatus -m maintain -o add -s 780-783
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_776 >legend_776.sql mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_780 >legend_780.sql
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_777 >legend_777.sql mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_781 >legend_781.sql
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_778 >legend_778.sql mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_782 >legend_782.sql
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_779 >legend_779.sql mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_783 >legend_783.sql
python wjtx.py initdb -s 776 python wjtx.py initdb -s 780
mysql -uroot -p0usmUwROtWjf -h10.10.6.2 legend_776 -e"source all.sql" mysql -uroot -p0usmUwROtWjf -h10.10.6.2 legend_780 -e"source all.sql"
python import_redis.py 10.10.6.169 6381 out/game_redis.script python import_redis.py 10.10.6.171 6381 out/game_redis.script
python import_redis.py 10.10.6.4 6379 out/global_redis.script python import_redis.py 10.10.6.4 6379 out/global_redis.script
close 10.10.6.170 close 10.10.6.172
python wjtx.py changestatus -m maintain -o remove -s 776-779 python wjtx.py changestatus -m maintain -o remove -s 780-783
==========================================step 2=============================================== ==========================================step 2===============================================
10.10.6.246,161 10.10.6.173,174
python wjtx.py changestatus -m maintain -o add -s 712-767 python wjtx.py changestatus -m maintain -o add -s 784-787
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_712 >legend_712.sql mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_784 >legend_784.sql
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_760 >legend_760.sql mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_785 >legend_785.sql
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_786 >legend_786.sql
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_787 >legend_787.sql
python wjtx.py initdb -s 712 python wjtx.py initdb -s 784
mysql -uroot -p0usmUwROtWjf -h10.10.6.2 legend_712 -e"source all.sql" mysql -uroot -p0usmUwROtWjf -h10.10.6.2 legend_784 -e"source all.sql"
python import_redis.py 10.10.6.246 6382 out/game_redis.script python import_redis.py 10.10.6.173 6381 out/game_redis.script
python import_redis.py 10.10.6.4 6379 out/global_redis.script python import_redis.py 10.10.6.4 6379 out/global_redis.script
close 10.10.6.161 close 10.10.6.174
python wjtx.py changestatus -m maintain -o remove -s 712-767 python wjtx.py changestatus -m maintain -o remove -s 784-787
=======================================step 3=============================================== =======================================step 3===============================================
10.10.6.165,167 10.10.6.165,169
python wjtx.py changestatus -m maintain -o add -s 768-775 python wjtx.py changestatus -m maintain -o add -s 768-779
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_768 >legend_768.sql mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_768 >legend_768.sql
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_772 >legend_772.sql mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_776 >legend_776.sql
python wjtx.py initdb -s 768 python wjtx.py initdb -s 768
mysql -uroot -p0usmUwROtWjf -h10.10.6.2 legend_768 -e"source all.sql" mysql -uroot -p0usmUwROtWjf -h10.10.6.2 legend_768 -e"source all.sql"
python import_redis.py 10.10.6.165 6381 out/game_redis.script python import_redis.py 10.10.6.165 6381 out/game_redis.script
python import_redis.py 10.10.6.4 6379 out/global_redis.script python import_redis.py 10.10.6.4 6379 out/global_redis.script
redis-cli -h 10.10.6.4 hdel hefu_info 768 redis-cli -h 10.10.6.4 hdel hefu_info 768
redis-cli -h 10.10.6.4 hdel hefu_info 772 redis-cli -h 10.10.6.4 hdel hefu_info 776
close 10.10.6.167 close 10.10.6.169
python wjtx.py changestatus -m maintain -o remove -s 768-775 python wjtx.py changestatus -m maintain -o remove -s 768-779

View File

@ -1,22 +1,22 @@
[ [
{ {
"serverid": 776, "serverid": 780,
"redis_host": "10.10.6.169", "redis_host": "10.10.6.171",
"redis_port": 6381 "redis_port": 6381
}, },
{ {
"serverid": 777, "serverid": 781,
"redis_host": "10.10.6.169", "redis_host": "10.10.6.171",
"redis_port": 6382 "redis_port": 6382
}, },
{ {
"serverid": 778, "serverid": 782,
"redis_host": "10.10.6.170", "redis_host": "10.10.6.172",
"redis_port": 6381 "redis_port": 6381
}, },
{ {
"serverid": 779, "serverid": 783,
"redis_host": "10.10.6.170", "redis_host": "10.10.6.172",
"redis_port": 6382 "redis_port": 6382
} }
] ]

View File

@ -1,12 +1,22 @@
[ [
{ {
"serverid": 712, "serverid": 784,
"redis_host": "10.10.6.246", "redis_host": "10.10.6.173",
"redis_port": 6381
},
{
"serverid": 785,
"redis_host": "10.10.6.173",
"redis_port": 6382 "redis_port": 6382
}, },
{ {
"serverid": 760, "serverid": 786,
"redis_host": "10.10.6.161", "redis_host": "10.10.6.174",
"redis_port": 6381 "redis_port": 6381
},
{
"serverid": 787,
"redis_host": "10.10.6.174",
"redis_port": 6382
} }
] ]

View File

@ -5,8 +5,8 @@
"redis_port": 6381 "redis_port": 6381
}, },
{ {
"serverid": 772, "serverid": 776,
"redis_host": "10.10.6.167", "redis_host": "10.10.6.169",
"redis_port": 6381 "redis_port": 6381
} }
] ]