I recently lost my mongodb data and do not have a backup. How can I restore data from mongodb dbPath having following content?
$ ls /var/lib/mongodb/
costats.0 costats-dev.0 costats-dev.ns costats.ns internalcrm.0 internalcrm.ns journal local.0 local.ns loopback.0 loopback.1 loopback.ns mongod.lock placeholder.0 placeholder.ns storage.bson _tmp
i want to restore data from loopback.0. Is it even possible?
If your data files are not deleted
mongod --dbpath /var/lib/mongodb/
This will start mongodb server with all your data. If data was curropted somehow, you can add
mongod --dbpath /var/lib/mongodb/ --repair
have u checked this ? I guess that if u have the xyz.0 db file it allows you to restore database thru above command.