This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Adding a user auth to a DB (read/write, add true as a third param for read-only) | |
use somedb | |
db.addUser("username","pasword") | |
// Update an entry (don't forget $set or it will be replace only with what is provided) | |
db.gadgets.update({key:"Some criteria"},{$set:{weight:17.6}}) | |
// Dump a database/collection | |
mongodump -d databasename -c collection -o . |
NewerOlder