Created
July 14, 2015 11:37
-
-
Save cobysy/59afed79262114a7fbed to your computer and use it in GitHub Desktop.
mongodump (to bson) and bsondump (parse bson to json)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mongodump --host mongodb1.example.net \ | |
--db db_name \ | |
--collection collection_name \ | |
--query '{ _id: { $gte: ObjectId("537c3ca7cfefc541c4a41a8e") } }' \ | |
--out /tmp/mongodump | |
bsondump tmp/mongodump/Historic.bson/db_name/mongodump.bson |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment