-
Type: Improvement
-
Resolution: Won't Do
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: Shell
-
None
running mongodump with the correct args and dealing with extended json (shell escaping, quotes and $ characters etc) is very confusing and difficult.
it would be nice to just be able to run a query through the same shell mechanism and save it to a file.
Something like:
db.collection.find({created_at:{$lt:ISODate("2014-01-01T16:20:49.177Z")}).sort({created_at:1}).dump("/tmp/path_to_file.bson")
or if not part of cursor prototype, at least a shell helper to take a cursor and iterate it + write bson to local file on disk.
- is duplicated by
-
SERVER-14881 Ability to easily save cursor contents to file or collection
- Backlog
- is related to
-
SERVER-5447 Option to write shell commands and results to a file
- Closed
- related to
-
SERVER-14880 Ability to output to file from mongo shell
- Backlog