美文网首页
【mongoDB】关于MongoDB Oplog窗口时间

【mongoDB】关于MongoDB Oplog窗口时间

作者: Bogon | 来源:发表于2022-09-11 09:04 被阅读0次
    /path/to//bin/mongo  --host xx.xx.xx.xx:27017   -u  username  -p 'password'  --authenticationDatabase=admin
    
    
    > rs.printReplicationInfo()   
    configured oplog size:   51200MB
    log length start to end: 24019311secs (6672.03hrs)
    oplog first event time:  Mon Dec 06 2021 15:28:16 GMT+0800 (CST)
    oplog last event time:   Sat Sep 10 2022 15:30:07 GMT+0800 (CST)
    now:                     Sat Sep 10 2022 15:30:09 GMT+0800 (CST)
    
    
    
    > db.getReplicationInfo() 
    {
        "logSizeMB" : 51200,
        "usedMB" : 6221.35,
        "timeDiff" : 24019341,
        "timeDiffHours" : 6672.04,
        "tFirst" : "Mon Dec 06 2021 15:28:16 GMT+0800 (CST)",
        "tLast" : "Sat Sep 10 2022 15:30:37 GMT+0800 (CST)",
        "now" : "Sat Sep 10 2022 15:30:38 GMT+0800 (CST)"
    }
    
    
    > db.printSlaveReplicationInfo()
    source: 192.168.69.136:27020
        syncedTo: Sat Sep 10 2022 15:33:11 GMT+0800 (CST)
        0 secs (0 hrs) behind the primary 
    
    
    

    参考

    MongoDB副本集的工作原理
    https://www.cnblogs.com/wilber2013/p/4154406.html

    MongoDB 更改 Oplog Size 大小
    https://blog.51cto.com/professor/2377323
    https://mongoing.com/docs/tutorial/change-oplog-size.html

    MongoDB Oplog窗口时间
    https://www.modb.pro/db/55869

    replSetResizeOplog
    https://www.mongodb.com/docs/upcoming/reference/command/replSetResizeOplog/#dbcmd.replSetResizeOplog

    replSetResizeOplog
    https://www.mongodb.com/docs/v4.2/reference/command/replSetResizeOplog/

    在集群中增加或者删除分片
    https://www.bookstack.cn/read/piaosanlang-mongodb/996d2bed6b85bea7.md

    MongoDB Oplog 详解
    https://www.cnblogs.com/operationhome/p/10688798.html

    Mongodb 复制的纽带–Oplog
    https://www.bookstack.cn/read/piaosanlang-mongodb/e921df26646d53f2.md

    MongoDB副本集添加新的节点
    https://blog.csdn.net/csdnhsh/article/details/116333686

    相关文章

      网友评论

          本文标题:【mongoDB】关于MongoDB Oplog窗口时间

          本文链接:https://www.haomeiwen.com/subject/tzhvnrtx.html