[SERVER-7860] mongodump do not work properly in "print to stdout" mode Created: 06/Dec/12 Updated: 09/Jul/16 Resolved: 08/Dec/12 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Tools |
| Affects Version/s: | 2.2.0 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Trivial - P5 |
| Reporter: | Denis Bozhok | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
logger-01 ~ # uname -a |
||
| Operating System: | ALL |
| Steps To Reproduce: | execute mongodump --host localhost -d <dbname> -o - |
| Participants: |
| Description |
|
when trying to dump the database to the specified dir, it seems ok: when trying to do the same, but to the stdout: it`s verys usable to send output to the gzip or other compressor and compress the data 'on the fly' with out huge disk usage. |
| Comments |
| Comment by Vasyl Khrystiuk [ 08/Nov/13 ] |
|
but there must be another way to dump all collections from db to one *.tar file |
| Comment by Daniel Pasette (Inactive) [ 11/Dec/12 ] |
|
because mongodump does the logic you've described for you and outputs each collection to a separate file. |
| Comment by Denis Bozhok [ 11/Dec/12 ] |
|
So, if I need to dump all databases with all collections inside, firstly I have to take a list of all databases and collections and then pass it to the mongodump? |
| Comment by Daniel Pasette (Inactive) [ 10/Dec/12 ] |
|
You will have to script this on the client side. |
| Comment by Denis Bozhok [ 10/Dec/12 ] |
|
Thanks for your reply. |
| Comment by Daniel Pasette (Inactive) [ 08/Dec/12 ] |
|
As the error message says, you need to specify a collection when using mongodump with stdout. There is no binary delimiter between different collections. We'll add a note to the mongodump documentation |