On Thursday, 24 December 2015 08:04:36 UTC+11, John wrote:
I have MongoDB 2.6 installed on my computer. When I start mongod.exe with dbpath "\folderA" and insert some documents, then stop mongodb and start it again with dbpath "\folderB", I find the same documents in there when I query it. I'm a missing some basic point here?
Hi John,
When you start mongod with --dbpath, this determines the directory used for database files. If you start mongod with different dbpath values there shouldn’t be any data shared between the two invocations.
How are you stopping mongod? Are you certain there isn’t another running instance of mongod that you are connecting to?
FYI, you can check the current dbPath in the mongo shell (if changed from the default) using: db.serverCmdLineOpts().parsed.storage.dbPath.
Regards,
Stephen