Unable to restore MongoDB After Dropping - mongodb

Is there anyway I can restore the MongoDB after dropping with no backup.
We tried finding any auto backups with no luck.
Thanks!

You can't restore without any backups in MongoDB. there is no any auto backup options in mongoDB. If you want auto back follow this instructions easy-automatic-nightly-backups-for-mongodb
backup-and-restore-tools

Related

How to restore mongo db data from old files?

my server crashed... I don't have a recent backup but I do have access of the files. I'm wondering If I can restore data from the old mongodb folder? any suggestions?
You can get query logs mongodb.log file if your profiling level set for logging any queries. If not, you can't restore.

How to avoid auto-updating of MongoDB ObjectIds after restoring the dump using mongorestore command?

I am trying to restore my database dump using mongorestore command. And got to know that some ObjectIds are updating automatically after restoring and am facing data dependency issues with that. Does ObjectIds updates itself while restoring? If yes, is there any alternative to stop that issue?

mongodb is not start after restoring /var/lib/mongodb manually

Our server's raid failed today. Right now we have a zip file of mongodbPath but after we extract it, we can not start mongo db again.
I will appreciate any help.
After a lot of searches and contacting with MongoDB's support we fond out that we rsync MongoDB directory when it was writing.
So we cannot restore data and we had data lost!
If you want to use rsync for getting backup of MongoDB you should stop it.
This may help.

Mongodump with --oplog for hot backup

I'm looking for the right way to do a Mongodb backup on a replica set (non-sharded).
By reading the Mongodb documentation, I understand that a "mongodump --oplog" should be enough, even on a replica (slave) server.
From the mongodb / mongodump documentation :
--oplog
Use this option to ensure that mongodump creates a dump of the database that includes an oplog, to create a point-in-time snapshot of the state of a mongod instance. To restore to a specific point-in-time backup, use the output created with this option in conjunction with mongorestore --oplogReplay.
Without --oplog, if there are write operations during the dump operation, the dump will not reflect a single moment in time. Changes made to the database during the update process can affect the output of the backup
I'm still having a very hard time to understand how Mongodb can backup and keep writing on the database and make a consistent backup, even with --oplog.
Should I lock my collections first or is it safe to run "mongodump --oplog ?
Is there anything else I should know about?
Thanks.
The following document explains how mongodump with –oplog option works to create a point in time backup.
http://docs.mongodb.org/manual/tutorial/backup-databases-with-binary-database-dumps/
However, using mongodump and mongorestore to back up and restore MongodDB can be slow. If file system snapshot is an option, you may want to consider using snapshot for MongoDB backup. Information from the following link details two snapshot options for performing hot backup of MongoDB.
http://docs.mongodb.org/manual/tutorial/backup-databases-with-filesystem-snapshots/
You can also look into MongoDB backup service.
http://www.10gen.com/products/mongodb-backup-service

Is it possible to undo a drop operation on a Mongo Collection?

I have a standalone setup of MongoDB 2.0.2 with default settings. I accidently dropped a collection from the shell using db.mycollection.drop() . Is there anyway I can undo this operation and rollback to previous state?
With a stand alone (no replicaset) I am afraid that you may not be able to recover your data. Read this post How to recover a dropped MongoDB database?