title: How to export from mlab to local mongoDB
body: <p>I am new to mongoDB and I need to export the database from mlab to my local mongoDB for development purposes. </p>
  
  <p>I have navigated to my MongoDB\Server\4.0\bin using cmd and tried the commands suggested from mlab: </p>
  
  <pre><code>mongodump -h dsxxxx.mlab.com:xxxxx-d heroku_xxxxxx -u myusername -p mypassword -o datamlab
  </code></pre>
  
  <p>which gave error: Failed: error dumping metadata: error creating directory for metadata file </p>
  
  <p>I have also tried to replace the 'datamlab' with paths which I don't think works because it says positional arguments not allowed</p>
  
  <p>Since the dump was not working, I also tried to export the data through json by using</p>
  
  <pre><code>mongoexport -h dsxxxx.mlab.com:xxxx-d heroku_2t909tjl -c conversations -u xxxx -p xxxx -o export1.json
  </code></pre>
  
  <p>which shows the error: error opening output stream: open export1.json: Access is denied.</p>
  
  <p>I have no idea why it is not working...</p>
  
  <p>Please help...</p>