title: Which is my database in mongodb?
body: <p>Next question in reference with previous one <a href="https://stackoverflow.com/questions/22369671/where-does-mongodb-store-databse-in-ubuntu">Where does mongodb store databse in ubuntu?</a></p>
  
  <pre><code>$ cd /var/lib/mongodb/
  $ ls
  ihtx.0  ihtx.1  ihtx.ns  journal  local.0  local.ns  mongod.lock
  </code></pre>
  
  <p>Here, I can see <code>ihtx.0  ihtx.1  ihtx.ns</code> three files with the same name. Here which one is mydatabase which I usually see in mongo shell?
  which one  should I dump ?</p>
  
  <p>Tried each, getting following error :</p>
  
  <pre><code>$ mongodump --dbpath /var/lib/mongodb/ihtx.XX --out /home/user/Desktop/
  
  If you are running a mongod on the same path you should connect to that instead of direct data file access
  
  Thu Mar 13 11:17:21.123 dbexit: 
  Thu Mar 13 11:17:21.123 [tools] shutdown: going to close listening sockets...
  Thu Mar 13 11:17:21.123 [tools] shutdown: going to flush diaglog...
  Thu Mar 13 11:17:21.123 [tools] shutdown: going to close sockets...
  Thu Mar 13 11:17:21.123 [tools] shutdown: waiting for fs preallocator...
  Thu Mar 13 11:17:21.123 [tools] shutdown: closing all files...
  Thu Mar 13 11:17:21.123 [tools] closeAllFiles() finished
  Thu Mar 13 11:17:21.123 [tools] shutdown: removing fs lock...
  Thu Mar 13 11:17:21.123 [tools] couldn't remove fs lock errno:9 Bad file descriptor
  Thu Mar 13 11:17:21.123 dbexit: really exiting now
  </code></pre>