db.printSecondaryReplicationInfo() in mongoDB

db.printSecondaryReplicationInfo()

This method prints a formatted report of the replica set member’s oplog.

Syntax:

db.printSecondaryReplicationInfo()


Example

MongoDB

db.printSecondaryReplicationInfo()

Output:

source: localhost:27001
    syncedTo: Wed July 06 2022 16:30:50 GMT-0800
    0 secs (0 hrs) behind the primary
source: localhost:27002
    syncedTo: Wed July 06 2022 16:30:50 GMT-0800
    0 secs (0 hrs) behind the primary


No comments:

Post a Comment