I am exporting data from one database and importing data into another database. When I export data to a machine with mongo 2.6, but when I import data to a VM using mongo 2.4. Both mongod instances work 2.4.
I keep getting this error:
Wed Jun 4 13:13:32.604 check 0 0
Wed Jun 4 13:13:32.604 imported 0 objects
Wed Jun 4 13:13:32.604 ERROR: encountered 1 error(s)
failed: [192.168.140.30] => (item=collection) => {"changed": true, "cmd": "mongoimport -u username -p password -d db -c collection --drop --jsonArray /tmp/collection.json ", "delta": "0:00:00.026383", "end": "2014-06-04 13:13:33.091774", "item": "collection", "rc": 255, "start": "2014-06-04 13:13:33.065391"}
stdout: connected to: 127.0.0.1
Wed Jun 4 13:13:33.089 dropping: <db.collection>
Wed Jun 4 13:13:33.089 exception:BSON representation of supplied JSON array is too large: code FailedToParse: FailedToParse: Date expecting integer milliseconds: offset:171
And the format of the exported date looks like
{ "date" : { "$date" : "2014-06-02T06:39:28.869-0700" }
I checked that using mongoimport on the same machine as mongoexport works fine, so I assume there is a compatibility issue between mongoimport / export from 2.4 to 2.6. Due to firewall restrictions, I need to use two different machines to move data.
- . , . , .