Skip to content

Instantly share code, notes, and snippets.

@butlern
Created July 28, 2014 01:52
Show Gist options
  • Save butlern/6cc86aea397407712c11 to your computer and use it in GitHub Desktop.
Save butlern/6cc86aea397407712c11 to your computer and use it in GitHub Desktop.
oplog-resize-runlist
1. service mongodb stop
2. mongod --dbpath /mongo/db --port 37017
3. cd /mongo ; mongodump --db local --collection 'oplog.rs' --port 37017
4. mongo --port 37017 ~/oplog-resize.js
5. mongo --port 37017
> use admin
> db.shutdownServer()
6. service mongodb start
7. mongo # Verify Oplog is new size
> db.printReplicationInfo()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment