mongo --host <hostname>:<port> <db>
# To list databases
show dbs
# To create DB
use DBNAME
# To create collection
db.createCollection("NAME")# Export: this will create dump dir with DBNAME dir under it
mongodump --host HOST --port PORT --db DBNAME
# Import: The DBDIR should be generally same as DBNAME
mongorestore --host HOST --port PORT --db DBNAME DBDIR