You can back up and restore a MongoDB database with two commands. Use mongodump to get a full dump of all MongoDB contents. Use mongorestore to recover data from a dump file back into the MongoDB system.