views:

169

answers:

2

Please help!

Mongodb crashed on my server. When I started the mongod backup I have no data in database!

Looking at the data/db/ directory I have the following 5 files:

mongo.lock
production-mongodb       4k
production-mongodb.0     64m
production-mongodb.1     128m
production-mongodb.ns    16m

I think mongo has somehow started a new database, keeping my old one? Hopefully! If this is correct how do I fix this? And what is going on here?

I have tried to remove the lock file and run mongod --repair but still empty database.

A: 

What does show dbs show? Did you switch to the correct DB assuming you see "production" listed?

luckytaxi
i have local, admin and production-mongodb dbs but the production-mongodb has not data in and only 2 colleections ??
rick moss
i would raise this on their forum.
luckytaxi
A: 

OK, based on the files you've listed, you have one database named "production-mongodb".

So you'll want to run mongod production-mongodb to get command-line access.

Or you can do mongod

use production-mongodb

show collections

You should see your data.

Gates VP
he already stated that he sees his collection but his data isn't there.
luckytaxi