Lost collections!

22 views
Skip to first unread message

erin

unread,
Mar 29, 2017, 4:19:05 PM3/29/17
to mongodb-user
Hi 
I am running into a problem that: the files in /data look intact, but we lost collections when connect to the database. There should be more than 10 collections but now they are gone, but the datafiles still in the /data folder.
I checked the log file there isn't any suspicious activity.
Can someone help?

Thanks

Rhys Campbell

unread,
Mar 29, 2017, 4:26:24 PM3/29/17
to mongodb-user
First I'd check permissions on those files and then I'd confirm you have started the db server with the correct dbpath.

You can check the db path value inside mongo with...

db.adminCommand("getCmdLineOpts")

Linux or Windows. Which version of MongoDB?

Rhys Campbell

unread,
Mar 30, 2017, 4:33:33 AM3/30/17
to mongodb-user
Just an additional thought...

When you connect to the mongo shell do you execute a use database statement first... i.e.

mongo> use mydb;
mongo> show collections;
Reply all
Reply to author
Forward
0 new messages