In this recipe, we will look at some basic backup and restore operations using utilities such as
mongorestore to back up and restore files.
We will start a single instance of mongod. Refer to the recipe Installing single node MongoDB in Chapter 1, Installing and Starting the Server, to start a mongo instance and connect to it from a mongo shell. We will need some data to backup. If you already have some data in your test database, that will be fine. If not, create some from the
countries.geo.json file available in the code bundle using the following command:
$ mongoimport -c countries -d test --drop countries.geo.json