Reputation: 1351
I am running mongod as standalone server .now i want to enable oplog for it ,i want to know whether it is possible or not ?
I knew I can do this by creating single node ReplicaSet ,but I want to do this without replica set .
Upvotes: 17
Views: 15233
Reputation: 1928
For mongo 2.6 or greater the /etc/mongod.conf now uses a yaml format.
To enable the oplog add something similar to the below, note the replication:
line may already exist, be sure to use spaces.
replication:
replSetName: rs0
oplogSizeMB: 100
Full documentation here: https://docs.mongodb.com/manual/reference/configuration-options/#replication-options
Upvotes: 7