1

My database in MongoDB was not accessible after the journal file became of the size > 1 GB . So I restarted the mongod process with a different data path to store the mongodb files in my machine.
Now I want to recover my old data from the old path but I am unable to do so. Can anyone help?

The DB is on a 64 bit Ubuntu box.

0

1 Answer 1

1

Check this guide: http://docs.mongodb.org/manual/tutorial/backup-with-mongodump/ Create Backups Without a Running mongod Instance

If your MongoDB instance is not running, you can use the --dbpath option to specify the location to your MongoDB instance’s database files. mongodump reads from the data files directly with this operation. This locks the data directory to prevent conflicting writes. The mongod process must not be running or attached to these data files when you run mongodump in this configuration.

mongodump --dbpath /old_data -o dataout

Then restore to a new data-directory and access the databases.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.