There are several ways to back up a database in MongoDB. One quick way to back up a database is to use the mongodump
tool.
mongodump
reads data from a MongoDB database and creates high fidelity BSON files which the mongorestore
utitlity can use to restore a MongoDB database.
With mongodump
, you can back up a collection, a database, or all databases.