And there are many command that are accessible to perform the execution of mongodump command,Such as:
|Mongodump–collection–COLLECTION–db DB_NAME||The following command will intend for reinforcement just only the determined set of indicated database.||Mongodump–collection mycol–db test|
|Mongodump–host HOST_NAME–port PORT_NUMBER||All the databases will be backedup by using the command of mongodb||Mongodump–host site name–port 27107|
|Mongodump–dbpath DB_PATH–out BACKUP_DIRECTORY||All the databases will be backedup by using the command of mongodb||Mongodump–dbpath/data/db/–out/data/backup|
c:Program Files\MongoDB\Server\3.2\bin&gt;mongodump connected to :127.0.0.1 Wen July 13 09:45:12.789 all dbs Wen July 13 09:45:12.793 DATABASE:test to dump\test Wen July 13 09:45:12.795 test.system.indexes to dump\test\system.indexes.bson Wen July 13 09:45:12.798 4 objects Wen July 13 09:45:12.800 test.my to dump\test\my.bson Wen July 13 09:45:12.803 0 objects Wen July 13 09:45:12.803 Metadata for test.my to dump\test\my.metadata.json Wen July 13 09:45:12.807 test.cool1 to dump\test\cool1.bson Wen July 13 09:45:12.810 1 objects Wen July 13 09:45:12.812 Metadata for test.cool1 to dump\test\cool1.metadata.json Wen July 13 09:45:12.814 test.mycol to dump\test\mycol.bson Wen July 13 09:45:12.817 2 objects Wen July 13 09:45:12.819 Metadata for test.mycol to dump\test\mycol.metadata.json
Here in the above example, the mongodump command will dump each and every information into the dump directory.
In the command prompt if we are performing this restore information all the records that has been removed from the directory will be restored back to the main mongodb server.