目的是想备份整个项目的全部数据,不限于某一个collection
使用的命令:
mongoexport —db Demo —out demo_backup.json
运行后报错:
Error parsing command line: too many positional options
求各位大神帮忙
PHP中文网2017-04-24 09:15:54
I solved this problem by removing the spaces between the fields to be exported after the -f parameter. Then it's fine.
高洛峰2017-04-24 09:15:54
Found the answer on stack overflow
mongodump -d Demo -o demo_backup.json
http://stackoverflow.com/questions/7521163/what-does-too-many-positional-options-mean-when-doing-a-mongoexport
I don’t know how to solve the problem if I continue to use mongoexport