Last active
March 4, 2021 19:06
-
-
Save terenced/5ab662d18a9cb5cf089cd586cc045cb0 to your computer and use it in GitHub Desktop.
Dump Mongo query results to file
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
mongo DB_NAME --quiet --eval 'DBQuery.shellBatchSize = 2000; db.COLLECTION_NAME.find({}).limit(2000).toArray()' > collection.json |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment