backup mongodb database code example
Example 1: drop mongodb database
db.dropDatabase()
Example 2: take db backup mongodb
mongodump --collection=myCollection --db=test
Example 3: take db backup mongodb
mongodump --out=/data/backup/
Example 4: take db backup mongodb
mongodump --host=mongodb1.example.net --port=3017 --username=user --password="pass" --out=/opt/backup/mongodump-2013-10-24