Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Mongo restore Error
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Balthazar Rouberol  
View profile  
 More options Sep 28 2012, 6:58 am
From: Balthazar Rouberol <roubero...@gmail.com>
Date: Fri, 28 Sep 2012 03:58:04 -0700 (PDT)
Local: Fri, Sep 28 2012 6:58 am
Subject: Re: [mongodb-user] Re: Mongo restore Error

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

On Wednesday, December 7, 2011 3:32:04 AM UTC+1, Eliot Horowitz wrote:

> Can you just run mongodump -d ... -c ...
> without piping and try that

> On Tue, Dec 6, 2011 at 9:23 PM, Asoka Sampath Edussooriya
> <eas...@gmail.com <javascript:>> wrote:
> > Hi Brandon,

> > Still I get the same error.

> > Thanks!

> > Asoka

> > On Tue, Dec 6, 2011 at 11:56 PM, Brandon Diamond <bra...@10gen.com<javascript:>>
> wrote:

> >> I suspect that some of the non-bson output of mongodump may have been
> >> included in dump.bson

> >> Please try re-dumping using the "--out" option to set the output
> >> location.

> >> On Dec 6, 4:51 am, Nik <dinoosh.n...@gmail.com> wrote:
> >> > dump was successful. I dumped the db and again tried to restore to a
> >> > separate db. still the same error... this is a fresh installation of
> >> > mongodb. do i have change some configuration or create some?

> >> --
> >> 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<javascript:>
> .
> >> To unsubscribe from this group, send email to
> >> mongodb-user...@googlegroups.com <javascript:>.
> >> For more options, visit this group at
> >> http://groups.google.com/group/mongodb-user?hl=en.

> > --
> > Asoka Sampath Edussooriya

> > --
> > 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<javascript:>
> .
> > To unsubscribe from this group, send email to
> > mongodb-user...@googlegroups.com <javascript:>.
> > For more options, visit this group at
> > http://groups.google.com/group/mongodb-user?hl=en.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.