Backup/restore a database
by sij /
Backup the database
Creates a directory “dump”, which contains a folder with the db name. And this director contains the backup files of all collections. With “–out=” you can specify where you want the backup to be stored.
Restore the database
mongorestore --db=database-name dump/