Question

I'm trying to restore a BSON file into a MongoDB collection and I get the following error:

me@vm:~$ mongo --version
MongoDB shell version: 2.4.6
me@vm:~$ mongorestore --db test dump/oxyme-data.bson
connected to: 127.0.0.1
Tue Mar  4 18:11:28.839 dump/oxyme-data.bson
Tue Mar  4 18:11:28.839     going into namespace [test.oxyme-data]
Tue Mar  4 18:11:28.839 dump/oxyme-data.metadata.json not found. Skipping.
assertion: 10264 invalid object size: 2064190043

There are several reports of this issue, but they are because of an extra debugline that mongodump used to add to the dump, and this is fixed, or at least I'm reasonably sure that's not the problem here because the end and the start of the .bson file seem fine.

See for example restoring a dump with mongodb fails, which has a simple fix that doesn't work for me. There's a bug report https://jira.mongodb.org/browse/SERVER-7007, is this just this bug?

EDIT:

The size of the file:

-rw-r--r-- 1 me me 106M Mar  4 16:01 oxyme-data.bson

The version of MongoDB that made the backup is unknown. Isn't BSON a valid standard on it's own as well?

I've checked, and the restore didn't succeed.

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top