Closed smlgbl closed 8 years ago
Just realized, the error is already in the exported bson file. bsondump --type=debug says, the _id field is of type 1, which is Double, from the mongodump BSON file, but it's of type 17 (=TimeStamp) in the BSON file from mongodb-backup. Moving this issue to the other module....
hi @smlgbl,
I replicate your issue with abfb6350d68dd4658997130e4beb2b3e678d8ded commit
you should update mongodb-restore to 1.5.x
or change mongodb dependency to 1.5.x
{
- "_bsontype": "Timestamp"
+ "_bsontype": "Long"
}
When exporting/backup-ing and subsequent restoring of documents with IDs like this:
"_id" : "1000576093407275579" (Int64)
they end up being transformed to this:
"_id" : Timestamp(1833010877, -705238994)
This is with the standard BSON parser. As a workaround I tried using the JSON parser, but that screws up all datatypes. This does not happen with the standard mongodump/mongorestore tools, but they're also using BSON as intermediate format.