I have a collection called as movie with two documents and two indexes: the default index on _id and an index on a field year. I verified the data and indexes using the following methods from mongo shell:
shell > db.movie.find()
shell > db.movie.getIndexes()
From the Windows OS command prompt:
os > mongodump --db=test --collection=movie
This created a folder dump\test with two files: movie.bson, and movie.metadata. The folder and files are created in the directory from where I ran the mongodump command.
Again, from the OS command prompt:
os > mongorestore --db=test --collection=movie_new dump/test/movie.bson
From the shell, I could verify:
shell > db.movie_new.find()
shell > db.movie_new.getIndexes()