Skip to content

Instantly share code, notes, and snippets.

@akm
Created April 16, 2014 05:05
Show Gist options
  • Select an option

  • Save akm/10809412 to your computer and use it in GitHub Desktop.

Select an option

Save akm/10809412 to your computer and use it in GitHub Desktop.
MongoDB-2.6.0で変わったmongoexportの出力 ref: http://qiita.com/akm/items/528428dc5bc848a3963c
% mongo test --eval "db.d1.drop(); db.d1.insert({no: 1, d: new Date()})" && mongoexport -d test -c d1
MongoDB shell version: 2.4.6
connecting to: test
connected to: 127.0.0.1
{ "_id" : { "$oid" : "534e0af8532dbdbaa7c05783" }, "no" : 1, "d" : { "$date" : 1397623544193 } }
exported 1 records
% mongo test --eval "db.d1.drop(); db.d1.insert({no: 1, d: new Date()})" && mongoexport -d test -c d1
MongoDB shell version: 2.6.0
connecting to: test
WriteResult({ "nInserted" : 1 })
connected to: 127.0.0.1
{ "_id" : { "$oid" : "534e0ac4d878f94330ea955e" }, "no" : 1, "d" : { "$date" : "2014-04-16T13:44:52.922+0900" } }
exported 1 records
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment