目的是想备份整个项目的全部数据,不限于某一个collection
使用的命令: mongoexport —db Demo —out demo_backup.json
运行后报错: Error parsing command line: too many positional options
求各位大神帮忙
走同样的路,发现不同的人生
I solved this problem by removing the spaces between the fields to be exported after the -f parameter. Then it's fine.
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
I solved this problem by removing the spaces between the fields to be exported after the -f parameter. Then it's fine.
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