Skip to content

Instantly share code, notes, and snippets.

@jeffgca
Created January 3, 2011 21:18
Show Gist options
  • Save jeffgca/763980 to your computer and use it in GitHub Desktop.
Save jeffgca/763980 to your computer and use it in GitHub Desktop.
Some common commands I still haven't committed to muscle memory
// Note: more here: http://www.mongodb.org/display/DOCS/dbshell+Reference
// also, scripting note: db = db.getSisterDB( "users" ) is a script equiv of use users in the shell
// get rs status
rs.status()
// re-configure replicaset
config = rs.conf()
//manipulate the config data here
rs.reconfigure(config);
// drop a collection
db.collectionName.drop()
// drop a database
db.dropDatabase()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment