I have specified a directory for my databases, but i cannot see the files. I have created 2 databases, “test” and “eieio”. I can see them at the command prompt using “db”, and i can do CRUD operations on them. But, when i look at my folder in windows explorer, they are not there, neither can i search for them in Windows taskbar search. Can someone tell me where to look and what to look for?
mongod has an option to create separate directories for each database. For your existing deployment, you can create separate directories for each database using the option –directoryperdb (and following instructions in the documentation).
This is my db folder. I searched documentation for .wt, but tons of info comes up. Is there some page that gives brief overview of these various files and folders that gives some explanation of structure and use?
would just like to understand what i am seeing. i have done a lot of MS Access work over the years and i can open tables, see the text in queries, etc. I was just wondering if these various files can be opened with a text editor, which file contains my data, and so forth.
Thinking about backup too. Would i just backup everything in the folder and call it a day? Just trying to understand what i am seeing.
If you are wanting to ad-hoc navigate and query your database you’ll want to use a GUI client like MongoDB Compass or the mongo command line interface.
That makes sense. I tried Compass, it works great. I guess that i was thinking that MongoDB stored data in a text file full of json. Really, i am just trying to get familiar with the workings of Mongo.
MongoDB stores data and indexes on disk in a compressed binary format. Individual documents are represented in BSON, a binary JSON-like serialisation format that supports additional data types such as dates, 32-bit integers, 64-bit integers, 128-bit decimals, ObjectIDs, and binary data.
Data is written to disk using block compression for documents and prefix compression for indexes. Compression defaults are configurable at a global level and can also be set on a per-collection and per-index basis during collection and index creation.
For further reading that might provide helpful background info, see: