mongodump "too many positional options have been specified on the command line"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mongodb (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Xenial |
Triaged
|
Undecided
|
Unassigned | ||
Yakkety |
Triaged
|
Undecided
|
Unassigned |
Bug Description
I can't run the mongodump utility in Ubuntu (from the internal packages).
Running without any parameters works BTW.
I tried running a dump this way:
mongodump -u xxxx -p xxxx --host somehost.com:27017 -d some_db -o backup
And I got this reply:
Error parsing command line: too many positional options have been specified on the command line
try 'mongodump --help' for more information
Then I purged the package using:
apt purge mongodb
And then added the official mongo repo as explained on the mongo website:
https:/
Ran the same command again and voila! it worked.
I tried search for the "too many positional" error and found out it might have something to do with some problematic minus or em-dash/en-dash but it's not the case because I wrote everything manually and the same command exactly worked with the official mongodb-org by mongo.
tags: | added: mongo |
description: | updated |
description: | updated |
Changed in mongodb (Ubuntu): | |
status: | Incomplete → New |
assignee: | nobody → Nish Aravamudan (nacc) |
Hello and thank you for filing this bug report.
Note that the `mongodump --help` output states:
-h, --host=<hostname> mongodb host to
connect to
(setname/ host1,host-
Have you tried:
mongodump -u xxxx -p xxxx --host= somehost. com:27017 -d some_db -o backup
?
As far as I can tell, mongodump has no positional arguments, so it's rather confusing.
I am unable to reproduce the issue, in any case, on 17.04 (with or without '='). What version of Ubuntu are you running?