This commit is contained in:
pengtao 2022-05-24 13:56:14 +08:00
parent 43128d1834
commit bad5e04122
4 changed files with 37 additions and 100 deletions

View File

@ -1,64 +1,31 @@
========================================check combine data=========================================
mysql -uroot -p0usmUwROtWjf -h10.10.6.2 legend_820 -e"select count(1),server_id from user group by server_id;"
mysql -uroot -p0usmUwROtWjf -h10.10.6.2 legend_832 -e"select count(1),server_id from user group by server_id;"
==========================================step 1===============================================
10.10.6.191-194
python wjtx.py changestatus -m maintain -o add -s 820-827
10.10.6.197-198
python wjtx.py changestatus -m maintain -o add -s 832-835
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_832 >legend_832.sql
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_833 >legend_833.sql
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_834 >legend_834.sql
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_835 >legend_835.sql
python wjtx.py initdb -s 832
mysql -uroot -p0usmUwROtWjf -h10.10.6.2 legend_832 -e"source all.sql"
python import_redis.py 10.10.6.197 6381 out/game_redis.script
python import_redis.py 10.10.6.4 6379 out/global_redis.script
close 10.10.6.198
python wjtx.py changestatus -m maintain -o remove -s 832-835
==========================================step 2===============================================
10.10.6.191,195
python wjtx.py changestatus -m maintain -o add -s 820-831
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_820 >legend_820.sql
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_821 >legend_821.sql
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_822 >legend_822.sql
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_823 >legend_823.sql
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_824 >legend_824.sql
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_825 >legend_825.sql
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_826 >legend_826.sql
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_827 >legend_827.sql
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_828 >legend_828.sql
python wjtx.py initdb -s 820
mysql -uroot -p0usmUwROtWjf -h10.10.6.2 legend_820 -e"source all.sql"
python import_redis.py 10.10.6.191 6381 out/game_redis.script
python import_redis.py 10.10.6.4 6379 out/global_redis.script
close 10.10.6.192-194
python wjtx.py changestatus -m maintain -o remove -s 820-827
==========================================step 2===============================================
10.10.6.195,196
python wjtx.py changestatus -m maintain -o add -s 828-831
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_828 >legend_828.sql
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_829 >legend_829.sql
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_830 >legend_830.sql
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_831 >legend_831.sql
python wjtx.py initdb -s 828
mysql -uroot -p0usmUwROtWjf -h10.10.6.2 legend_828 -e"source all.sql"
python import_redis.py 10.10.6.195 6381 out/game_redis.script
python import_redis.py 10.10.6.4 6379 out/global_redis.script
close 10.10.6.196
python wjtx.py changestatus -m maintain -o remove -s 828-831
=======================================step 3===============================================
10.10.6.246,179
python wjtx.py changestatus -m maintain -o add -s 712-807
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_796 >legend_796.sql
python wjtx.py initdb -s 712
mysql -uroot -p0usmUwROtWjf -h10.10.6.2 legend_712 -e"source all.sql"
python import_redis.py 10.10.6.246 6382 out/game_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 712
redis-cli -h 10.10.6.4 hdel hefu_info 796
close 10.10.6.179
python wjtx.py changestatus -m maintain -o remove -s 712-807
=======================================step 4===============================================
10.10.6.185,189
python wjtx.py changestatus -m maintain -o add -s 808-819
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_808 >legend_808.sql
mysqldump --default-character-set=utf8 -uwjtx -pmMWA4DKCfeOL -h10.10.6.2 legend_816 >legend_816.sql
python wjtx.py initdb -s 808
mysql -uroot -p0usmUwROtWjf -h10.10.6.2 legend_808 -e"source all.sql"
python import_redis.py 10.10.6.185 6381 out/game_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 808
redis-cli -h 10.10.6.4 hdel hefu_info 816
close 10.10.6.189
python wjtx.py changestatus -m maintain -o remove -s 808-819
redis-cli -h 10.10.6.4 hdel hefu_info 820
redis-cli -h 10.10.6.4 hdel hefu_info 828
close 10.10.6.195
python wjtx.py changestatus -m maintain -o remove -s 820-831

View File

@ -30,7 +30,7 @@ def read_json(filename):
def main():
create_conf_work()
csv_data = get_csv()
for i in range(1, 5):
for i in range(1, 3):
check_file = f"server_list_{i}.json"
json_data = read_json(check_file)
print(f"check {check_file}")

View File

@ -1,42 +1,22 @@
[
{
"serverid": 820,
"redis_host": "10.10.6.191",
"serverid": 832,
"redis_host": "10.10.6.197",
"redis_port": 6381
},
{
"serverid": 821,
"redis_host": "10.10.6.191",
"serverid": 833,
"redis_host": "10.10.6.197",
"redis_port": 6382
},
{
"serverid": 822,
"redis_host": "10.10.6.192",
"serverid": 834,
"redis_host": "10.10.6.198",
"redis_port": 6381
},
{
"serverid": 823,
"redis_host": "10.10.6.192",
"redis_port": 6382
},
{
"serverid": 824,
"redis_host": "10.10.6.193",
"redis_port": 6381
},
{
"serverid": 825,
"redis_host": "10.10.6.193",
"redis_port": 6382
},
{
"serverid": 826,
"redis_host": "10.10.6.194",
"redis_port": 6381
},
{
"serverid": 827,
"redis_host": "10.10.6.194",
"serverid": 835,
"redis_host": "10.10.6.198",
"redis_port": 6382
}
]

View File

@ -1,22 +1,12 @@
[
{
"serverid": 820,
"redis_host": "10.10.6.191",
"redis_port": 6381
},
{
"serverid": 828,
"redis_host": "10.10.6.195",
"redis_port": 6381
},
{
"serverid": 829,
"redis_host": "10.10.6.195",
"redis_port": 6382
},
{
"serverid": 830,
"redis_host": "10.10.6.196",
"redis_port": 6381
},
{
"serverid": 831,
"redis_host": "10.10.6.196",
"redis_port": 6382
}
]