Export and Import MongoDB? I come from a bash and mysql environment.  I'm trying to get use to mongodb. I see there are different ways to export and import mongodbs.  Does anyone know the bash and mongodb equivalent of

bash&gt; mysqldump -u username -p -h localhost mydatabase&gt; mydatabase.sql

bash&gt; mysql -u username -p -h localhost;

mysql&gt; create database mynewdatabase; grant all privileges on mynewdatabase.* to 'username'@'localhost' identified by 'mypass'; exit;

bash&gt; mysql -u username -p -h localhost mynewdatabase &lt; mydatabase.sql
Look at mongodump and mongorestore here in this tutorial in the documentation for backup and restore tools