Comment 0 for bug 1668903

Revision history for this message
Yaron (sh-yaron) wrote :

I can't run the mongodump utility in Ubuntu (from the internal packages).

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://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/

Ran the same command again and viola! 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.