I want to turn on oplog in a standalone instance in order use mongodump --oplog
on it however I fail to achieve that.
I follow 2 ways without success:
- Convert a Standalone to a Replica Set.
- I want to enable oplog on standalone mongod server ,not for single node replica set.
After trying, I have this configuration:
rs0:PRIMARY> rs.conf()
{
"_id" : "rs0",
"version" : 1,
"protocolVersion" : NumberLong(1),
"members" : [
{
"_id" : 0,
"host" : "smartshape.io.test:27017",
"arbiterOnly" : false,
"buildIndexes" : true,
"hidden" : false,
"priority" : 1,
"tags" : {
},
"slaveDelay" : NumberLong(0),
"votes" : 1
}
],
"settings" : {
"chainingAllowed" : true,
"heartbeatIntervalMillis" : 2000,
"heartbeatTimeoutSecs" : 10,
"electionTimeoutMillis" : 10000,
"getLastErrorModes" : {
},
"getLastErrorDefaults" : {
"w" : 1,
"wtimeout" : 0
},
"replicaSetId" : ObjectId("628b94350b78e951119f508c")
}
}
rs0:PRIMARY> rs.status()
{
"set" : "rs0",
"date" : ISODate("2022-05-23T14:29:01.664Z"),
"myState" : 1,
"term" : NumberLong(1),
"heartbeatIntervalMillis" : NumberLong(2000),
"members" : [
{
"_id" : 0,
"name" : "smartshape.io.test:27017",
"health" : 1,
"state" : 1,
"stateStr" : "PRIMARY",
"uptime" : 1541,
"optime" : {
"ts" : Timestamp(1653314744, 2),
"t" : NumberLong(1)
},
"optimeDate" : ISODate("2022-05-23T14:05:44Z"),
"electionTime" : Timestamp(1653314614, 1),
"electionDate" : ISODate("2022-05-23T14:03:34Z"),
"configVersion" : 1,
"self" : true
}
],
"ok" : 1
}
Context:
root@smartshape:~# mongod --version
db version v3.2.22
git version: 105acca0d443f9a47c1a5bd608fd7133840a58dd
OpenSSL version: OpenSSL 1.0.2n 7 Dec 2017
allocator: tcmalloc
modules: none
build environment:
distmod: ubuntu1404
distarch: x86_64
target_arch: x86_64