- 博客(4)
- 收藏
- 关注
原创 Shell 脚本如何 使用redis sentinel 模式 找到master 节点进行一系列动作
Shell 脚本如何 使用redis sentinel 模式 找到master 节点进行一系列动作一句话搞定:SENTINEL get-master-addr-by-name 例子:/bin/sh << EOF>host.masterredis-cli -h host -p port -a passwordSENTINEL get-master-addr-by-name serverhsotEOFhost=(sed−n1phost.master)port=(sed -n 1
2022-02-15 11:34:30 935
原创 mongo dump & restore === copy
mongo dumpmongodump -d dbName -h 127.0.0.1:27017 -u root -p root --authenticationDatabase admin -c collectionA -o ./mongorestore -h 127.0.0.1:27017 -d dbName -u root -p root --authenticationDatabase admin -c collectionB ./dbName/collectionA.bson --dro..
2021-02-04 14:22:37 55
原创 mongo shell 同一数据库中将a表值写入到b表中
db.collectionA.find().forEach(function(x){db.collectionB.insert(x);})
2021-02-04 14:18:37 230
原创 mongo shell 创建collection
mongo shell 创建collectiondb.createCollection(“connection name”)例如:db.createCollection(“test_details”)
2021-02-04 14:13:10 243
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人