first step is to list all databases. Get into the mongo terminal with mongo
and run the follwing command to show all the DBs
show dbs
use databaseName
show collectons
Then find the name of the DB.
mongoexport --db databaseName --collection collectionName --out output.json
to export the entire DB run
mongodump -d mydatabasename -o ./folderToExport