Mongo Cheatsheet - sdurbin1/safe-rest GitHub Wiki

Backup database:

mongodump --out data/latest/ --db safe 

Drop collection:

db.collection.drop()

Drop database:

use safe
db.dropDatabase()

Get rid of a field from a collection (ex, removing AnalyticParams from Analytics):

db.analytics.update({},{$unset: {analyticParams:1}},false,true)