[DOCS-7425] Comment on: "manual/reference/program/mongodump.txt" Created: 15/Mar/16  Updated: 17/Oct/16  Resolved: 17/Oct/16

Status: Closed
Project: Documentation
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor - P4
Reporter: Metikov Vadim Assignee: Allison Reinheimer Moore
Resolution: Done Votes: 0
Labels: collector-298ba4e7
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Mongodb version: 2.6.11
Kernel: 3.2.0-4-amd64 #1 SMP Debian 3.2.68-1+deb7u1 x86_64 GNU/Linux

Location: https://docs.mongodb.org/manual/reference/program/mongodump/#bin.mongodump
User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36
Referrer: https://docs.mongodb.org/manual/tutorial/backup-and-restore-tools/
Screen Resolution: 1600 x 900
repo: docs
source: reference/program/mongodump


Participants:
Days since reply: 7 years, 17 weeks, 2 days ago
Story Points: 0.25

 Description   

Hello!

Using mongodump with command:
mongodump --dbpath /var/lib/mongodb/ --repair --db grid_fs -o - | gzip -9 > mongodb.gz
just creates directory with name "-"(dash) and writes all to the files.
In output log i see strings like this:
writing to: -/grid_fs/statistics.daily.bson



 Comments   
Comment by Allison Reinheimer Moore [ 17/Oct/16 ]

Associated TOOLS ticket has been resolved (issue was apparently fixed in 3.0.10).

Comment by Kay Kim (Inactive) [ 24/Sep/16 ]

bulk assigning tickets in backlog to team members to groom.

Comment by Ravind Kumar (Inactive) [ 15/Mar/16 ]

Hello metikovvadim,

Firstly, I want to apologize - I mentioned removing the "-", but that was incorrect. That parameter is necessary for writing to standard output.

I see that you opened a SERVER ticket - this is the best route at the moment, so we can confirm what the issue is. If there are changes that need to be made to the documentation post-resolution of your issue, I will use this ticket to track those changes.

Thank you for bringing this to our attention.

Comment by Metikov Vadim [ 15/Mar/16 ]

Thank you for an answer, Ravind Kumar.
But in mongodump version 2.6.11 that's doesn't work:

# mongodump --dbpath /var/lib/mongodb/ --repair --db grid_fs -o |gzip -9 >/tmp/mongodb.gz
Error parsing command line: required parameter is missing in 'out'
try 'mongodump --help' for more information

And gzip parameter appears in version 3.2.

May be something else?

Comment by Ravind Kumar (Inactive) [ 15/Mar/16 ]

Hello Metikov,

Looking at your command, it seems like there might be an additional "-" character right after the -o parameter. This is likely why the directory contents are being dumped to the -/<dbname>/<collection> location.

Please try removing that additional "-". In addition, mongodump supports gzip as a parameter, so you might be able to exclude the pipe operator entirely and just use the -o parameter to output to the desired directory.

Generated at Thu Feb 08 07:54:15 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.