Has your database ever crashed before? Maybe you can run a repair
first before restoring again.
Can you paste the log, and if you have it, the dump file that failed?
On Dec 1, 10:30 am, Asoka Sampath Edussooriya <eas...@gmail.com>
wrote:
--
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To post to this group, send email to mongod...@googlegroups.com.
To unsubscribe from this group, send email to mongodb-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/mongodb-user?hl=en.
> --
> You received this message because you are subscribed to the Google Groups
> "mongodb-user" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/mongodb-user/-/ij-5PWhGbcoJ.
Please try re-dumping using the "--out" option to set the output
location.
--
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To post to this group, send email to mongod...@googlegroups.com.
To unsubscribe from this group, send email to mongodb-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/mongodb-user?hl=en.
I got the same error using a standalone mongoDB 2.2, and found a way to fix it.
I used the mongodump command as following:
mongodump --db twitter_nlp --collection home_timeline --out -> home_timeline.bson
mongorestore gave me the following output:
$ mongorestore --db twitter_nlp --collection test home_timeline.bson
connected to: 127.0.0.1
Fri Sep 28 12:53:47 home_timeline.bson
Fri Sep 28 12:53:47 going into namespace [twitter_nlp.test]
Fri Sep 28 12:53:47 home_timeline.metadata.json not found. Skipping.
assertion: 10264 invalid object size: 543781446
If you remove the first line of the bson file, with the following command, the mongorestore operation will work.
$ tail -n+2 home_timeline.bson > home_timeline_fix.bson
$ mongorestore --db twitter_nlp --collection test home_timeline_fix.bson
connected to: 127.0.0.1
Fri Sep 28 12:55:10 home_timeline_fix.bson
Fri Sep 28 12:55:10 going into namespace [twitter_nlp.test]
Fri Sep 28 12:55:10 home_timeline_fix.metadata.json not found. Skipping.
2516 objects found
NB: the first line of home_timeline.bson contains "Fri Sep 28 12:51:14 doing snapshot query",
which does not seem to be relevant for mongorestore.
--
Balthazar