In this recipe, we will be looking at how to take MongoDB backups using mongodump utility. This utility is a part of the MongoDB binary package and is usually available in the bin directory of the binary package. If you have installed MongoDB using a package management tool, like Ubuntu's apt or Red Hats yum, then the utility can simply be invoked by typing mongodump in the console.
Taking backup using mongodump tool
Getting ready
You need a single node MongoDB installation, preferably with some data in it. Refer to the recipe Creating an index in Chapter 2, Understanding and Managing Indexes, to learn how to import sample data into a MongoDB instance.