Error Too Many Positional Options Mongodump
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about
Too Many Positional Arguments Mongorestore
hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask too many positional options have been specified on the command line Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join mongoexport too many positional options them; it only takes a minute: Sign up What does “too many positional options” mean when doing a mongoexport? up vote 26 down vote favorite 7 mongoexport -h db.mysite.com -u myUser -p myPass -c myCollection But the response I
Mongoexport Query Too Many Positional Arguments
get is: ERROR: too many positional options What's that about? mongodb share|improve this question edited Sep 22 '11 at 21:27 Shamoon 533 asked Sep 22 '11 at 20:36 Aarvind 131123 What is the
Mongodb Too Many Positional (i.e. '$') Elements Found In Path
In general it is parsing error (some extra space or something like that), once try to "type" the command again instead of copying it from somewhere. –Khatri Sep 12 at 7:26 add a comment| 6 Answers 6 active oldest votes up vote 25 down vote I had this same problem. In my case, I was using mongoexport with the --query option, which expects a JSON document, such as: mongoexport ... --query {field: 'value'} ... I needed to surround the document with quotes: mongoexport ... --query "{field: 'value'}" ... share|improve this answer answered Nov 8 '12 at 15:53 Dean Langford 35035 3 Some OS's work slightly differently. The above solution worked for me on Windows, but for a colleague (Mac) he had to put the single quotes (') on the outside and double quotes (") on the inside. Win: mongoexport ... --query "{field: 'value'}" ... Mac: mongoexport ... --query '{field: "value"}' ... –Ron Tuffin Sep 10 '13 at 8:18 add a comment| up vote 13 down vote I had the same problem. Found a group post somewhere which said to remove the space between the '-p' and the password, which worked for me. Your sample command should be: mongoexport -h db.mysite.com -u myUser -pmyPass -c myCollection share|improve this answer answered Sep 29 '11 at 23:09 rowanu 891919 1 This also works for mongodump –trcarden Feb 15 '12 at 20:14 1 Additio
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of positional arguments not allowed mongodump this site About Us Learn more about Stack Overflow the company Business Learn
Command Line Parse Error Too Many Positional Options
more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question mongoexport csv too many positional arguments: [ x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Export http://stackoverflow.com/questions/7521163/what-does-too-many-positional-options-mean-when-doing-a-mongoexport the mongodump from one host to another up vote 0 down vote favorite I am having the mongodump of that collection in host A , Now i need to move that into host B. I have used, mongodump --host mongodb1.example.net --port 37017 --username user --password pass /opt/backup/mongodump-2011-10-24 but its not worked for me. Any other help on this? Thanks in advance. mongodb share|improve http://stackoverflow.com/questions/14118143/export-the-mongodump-from-one-host-to-another this question asked Jan 2 '13 at 7:06 Akan 35111 Can you us an error message instead if just saying it didn't work? –Sammaye Jan 2 '13 at 8:22 it throws error like "ERROR: too many positional options". –Akan Jan 2 '13 at 8:40 2 It is the file name doing this, the Linux terminal (or rather PuTTy for me) treats - as part of the command even when encapsulated with ", you can instead specify a specific out: ./mongodump --host mongodb1.example.net --port 37017 --username user --password pass --out=/opt/backup/mongodump-2011-10-24 which works –Sammaye Jan 2 '13 at 8:52 Its working. Thank you –Akan Jan 2 '13 at 9:03 Glad to have helped :) –Sammaye Jan 2 '13 at 9:03 add a comment| 1 Answer 1 active oldest votes up vote 3 down vote accepted In the terminal, in both native Linux terminal and PuTTY, the - within the file name is actually getting treated as a type of option to the command in general. Of course this throws an error when mongodump detects the wrong number of options etc which st
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this http://stackoverflow.com/questions/16515024/too-many-positional-options-error-mongodb-mongoexport site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Too many too many positional options error, Mongodb - mongoexport? up vote 0 down vote favorite I cannot figure out why im producing this error when trying to do a simple export of 3 fields to a .csv file for mongodb. My code is as follows: c:mongodb24\bin>mongoexport -db local -c pets -f type,name, color --csv -o c:\Data\CSC 451\spreadsheet.csv Error: too many positional options I'm wanting to export the type, too many positional name, and color data into the spreadsheet csv file. mongodb mongoexport share|improve this question edited May 13 '13 at 5:02 asked May 13 '13 at 4:47 Tone 36221536 1 Is that space necessary between name and color? –Mark May 13 '13 at 4:58 I found the error but I believe it was due to my file path for the exported csv. I had a space in the folder name. –Tone May 13 '13 at 5:01 add a comment| 2 Answers 2 active oldest votes up vote 1 down vote accepted Correct answer: c:mongodb24\bin>mongoexport -db local -c pets -f type,name,color --csv -o c:\Data\CSC451\spreadsheet.csv share|improve this answer answered May 13 '13 at 5:03 Tone 36221536 add a comment| up vote 0 down vote There are two ways to solve this. 1.) remove the space inthe filepath c:mongodb24\bin>mongoexport -db local -c pets -f type,name,color --csv -o c:\Data\CSC451\spreadsheet.csv 2.)surround the filepath in quotes c:mongodb24\bin>mongoexport -db local -c pets -f type,name,color --csv -o "c:\Data\CSC 451\spreadsheet.csv" Windows doesn't like Space's in the file path so you either have to remove the space, or if you can't do that without affecting something else you