lt 1 mese fa
parent
commit
f5c86981ac
1 ha cambiato i file con 3 aggiunte e 3 eliminazioni
  1. 3 3
      操作命令/三国合区保留区服.txt

+ 3 - 3
操作命令/三国合区保留区服.txt

@@ -1,6 +1,6 @@
 合区方法:
 1,redis中使用命令(举例:将10003的玩家合到10001)
-redis-cli -a "lVzYFQ2i6v" EVAL "local keys = redis.call('HKEYS', 'CUser_ServerId:'); local count = 0; for i,key in ipairs(keys) do if redis.call('HGET', 'CUser_ServerId:', key) == '10056' then redis.call('HSET', 'CUser_ServerId:', key, '10060'); count = count + 1; end; end; return count" 0
+redis-cli -a "tmKjD1ENs3HfZ7adzLJO!" EVAL "local keys = redis.call('HKEYS', 'CUser_ServerId:'); local count = 0; for i,key in ipairs(keys) do if redis.call('HGET', 'CUser_ServerId:', key) == '10002' then redis.call('HSET', 'CUser_ServerId:', key, '10001'); count = count + 1; end; end; return count" 0
 
 2,更新mongo中的x5_tk_login中的user_info中合服区的等级。
 // 更新服务器s1的玩家等级
@@ -45,9 +45,9 @@ db.getSiblingDB('m5_x1_game_10001').user.insertMany(
 
 另一中方式:
 先拷贝出来
-mongodump --uri='mongodb://admin:rimZBP82Ia@localhost:27017/m5_x1_game_10056?authSource=admin' --collection user --out /server/mongodb/
+mongodump --uri='mongodb://root:StrongMongoPass123@localhost:27017/m5_x1_game_10002?authSource=admin' --collection user --out /data/mongodb/
 再插入到目标数据库
-mongorestore --uri='mongodb://admin:rimZBP82Ia@localhost:27017/?authSource=admin' --db m5_x1_game_10060 --collection user /server/mongodb/m5_x1_game_10056/user.bson
+mongorestore --uri='mongodb://root:StrongMongoPass123@localhost:27017/?authSource=admin' --db m5_x1_game_10001 --collection user /data/mongodb/m5_x1_game_10002/user.bson
 
 db.getSiblingDB('m5_x1_game_10001').guildInfo.insertMany(
     db.getSiblingDB('m5_x1_game_10003').guildInfo.find().toArray(),