Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

mongodump 3.2.1 positional arguments not allowed

Tags:

mongodb

trying mongodump with following options and get "positional arguments not allowed"

mongodump --host=hostname --port=27017 --db=db --out=/path --oplog --gzip

tried mongodump -h hostname -d dbname and that works

What does the message

positional arguments not allowed

mean?

like image 514
OpenProjDevel Avatar asked May 23 '16 08:05

OpenProjDevel


2 Answers

You got the syntax wrong in the first one. You need to remove the = sign. See documentation.

mongodump --host hostname --port 27017 --db db --out /path --oplog --gzip
like image 194
styvane Avatar answered Nov 14 '22 12:11

styvane


mongodump -d<dbname> -o <backUpPath>

like this:

mongodump -d projectdb -o /Users/zhangzhanqi/Desktop/backup_mongo/aaa 
like image 42
张展旗 Avatar answered Nov 14 '22 13:11

张展旗