Inspecting mongo db on server, and keys?
-
is there a simple terminal program I can npm install to inspect a database?
I got this far manually
show dbs
admin 0.000GB
config 0.000GB
local 0.141GB
nodebb 0.002GBthe nodebb seems very small given I have already uploaded some posts and photos on the forum?
what data may be stored in local? it is much bigger but I dont have anything else running on that machine?The nodebb has collections:
objects
searchpost
searchtopic
sessionsWhich one are the chats stored in?
-
@eveh
the nodebb seems very small given I have already uploaded some posts and photos on the forum?
what data may be stored in local? it is much bigger but I dont have anything else running on that machine?
Photos aren't stored in the database directly (they're usually just stored along NodeBB files in a dedicated folder, but some plugins may change it to use cloud storage etc.), so all you're left with are some bits of text, which doesn't take that much space.Don't get me wrong - the DB can grow quite a bit, it just requires a lot of posts.
While your main question was answered already, I'll just note that you can find more on NodeBB DB schema in the documentation: https://docs.nodebb.org/development/database-structure/
-
@baris said in Inspecting mongo db on server, and keys?:
db.objects.find({_key: /^message:\d+/}).pretty();
This was very useful.
Could you possibly explain what the / ^ is doing ?and Im guessing \d+/ somehow means any numerical value ?
it seems like the keys are message: with a number after it ?