Skip to content

Commit

Permalink
fixed typos
Browse files Browse the repository at this point in the history
  • Loading branch information
olt committed Apr 9, 2011
1 parent 0361061 commit a9bf550
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions en/mongodb.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ A unique index can be created by supplying a second parameter and setting `uniqu

Indexes can be created on embedded fields (again, using the dot-notation) and on array fields. We can also create compound indexes:

db.unicorns.dropIndex({name: 1, vampires: -1});
db.unicorns.ensureIndex({name: 1, vampires: -1});

The order of your index (1 for ascending, -1 for descending) doesn't matter for a single key index, but it can have an impact for compound indexes when you are sorting or using a range condition.

Expand Down Expand Up @@ -669,7 +669,7 @@ You can disable the profiler by calling `setProfileLevel` again but changing the
db.setProfilingLevel(1, 1000);

### Backups and Restore ###
Within the MongoDB `bin` folder is a `mongodump` executable. Simply executing `mongodbump` will connect to localhost and backup all of your databases to a `dump` subfolder. You can type `mongodump --help` to see additional options. Common options are `--db DBNAME` to back up a specific database and `--collection COLLECTIONAME` to back up a specific collection. You can then use the `mongorestore` executable, located in the same `bin` folder, to restore a previously made backup. Again, the `--db` and `--collection` can be specified to restore a specific database and/or collection.
Within the MongoDB `bin` folder is a `mongodump` executable. Simply executing `mongodump` will connect to localhost and backup all of your databases to a `dump` subfolder. You can type `mongodump --help` to see additional options. Common options are `--db DBNAME` to back up a specific database and `--collection COLLECTIONAME` to back up a specific collection. You can then use the `mongorestore` executable, located in the same `bin` folder, to restore a previously made backup. Again, the `--db` and `--collection` can be specified to restore a specific database and/or collection.

For example, to back up our `learn` collection to a `backup` folder, we'd execute (this is its own executable which you run in a command/terminal window, not within the mongo shell itself):

Expand Down

0 comments on commit a9bf550

Please sign in to comment.