mongo dump

Say you want to do a dump of your mongo database onto your desktop.

You’d go:


mongodump -d DumpFolderName -o /location/of/your/directory

mongodump1

Once it makes a dump, you’ll see the DumpFolderName folder with various files in there. It contains the data of your database.

mongodump3

When you want to make the restore, copy the DumpFolderName to that machine. Make sure MongoDB is installed. Then just type


mongorestore DumpFolderName

mongodump2