Reputation: 1944
I have a standalone instance of mongodb (on windows) and want to enable oplog without replicaset.
I found this SO post and set the --master option in my windows service path. But oplog is not created. Any advice?
D:\MongoDB\2.6.5\bin\mongod.exe --dbpath=D:\MongoDB\2.6.5\data\db\ --logpath=D:\MongoDB\2.6.5\log\mongo.log --service --master
oplog enable on standalone mongod not for replicaset
Upvotes: 0
Views: 1021
Reputation: 11769
Besides starting it with --master and --logpath you also need to enable it manually by executing the following in mongo shell:
use local
rs.initiate( { _id : 'q', version : 1, members : [ {_id : 0, host : '127.0.0.1'} ] } )
Upvotes: 1