MongoDB directory Location?

Technical Support
  • #1

    So I'm running nodebb on an ubuntu vps and using mongodb as the database -- now I know I can simply use the cli command "mongo" to enter the shell -- but where is the data stored in general?

    I'd like to experiment with the database, and eventually test out getting other things to connect to it.

    (I used the the -y git nodejs mongodb build-essential to install it by the way)

  • #2

    For anyone interested, I was able to trace some information down đŸ˜„

    so using: "ps -xa | grep mongod" I was able to locate the config file for mongo in /etc/ (different than etc/)

    if you open the config file (mongodb.conf) -- some use gedit (if your distro has it or not), I use vim: vim mongodb.conf

    you can then find the path for the database =o -- for me that was: /var/lib/mongodb

    Hope this helps if anyone stumbles across this post đŸ™‚

    ps:
    If you're stuck in vim be sure to press "esc" on your keyboard, and then type ":q"

    I would recommend looking up vim and how it works if you plan on editing files with it -- alternatively, you could use sftp if you're using a VPS.

    Cheers!
    -ZenOokami


Suggested Topics


  • 0 Votes
    5 Posts
    343 Views

  • 1 Votes
    33 Posts
    1746 Views

  • 0 Votes
    1 Posts
    130 Views

  • 0 Votes
    8 Posts
    3938 Views

  • 0 Votes
    1 Posts
    647 Views

| | | |