November 2017
Intermediate to advanced
342 pages
9h 9m
English
Hand in hand with the previous operational tip, we may need to rethink and resize our oplog as our data grows. Operations become more complicated and time consuming as our data grows and we need to adjust our oplog size to accommodate for it.
The first step is to restart our MongoDB secondary server as a standalone server, an operation that has been described in the How to perform maintenance on replica sets section.
Then, we take a backup of our existing oplog:
> mongodump --db local --collection 'oplog.rs' --port 37017
And keep a copy of this data just in case.
Then we connect to our standalone database:
> use local> db = db.getSiblingDB('local')> db.temp.drop()
Up until now we connected to the local database and ...
Read now
Unlock full access