mongoexport意外的标识符

时间:2015-08-08 18:01:45

标签: mongodb mongodb-query

当我通过命令提示符执行mongodb导出查询时

'C:\Program' is not recognized as an internal or external command,
operable program or batch file.

C:\WINDOWS\system32>mongo
2015-08-08T22:21:06.874+0530 I CONTROL  Hotfix KB2731284 or later update is inst
alled, no need to zero-out data files
MongoDB shell version: 3.0.4
connecting to: test

> use mydb
switched to db mydb

> db.getCollectionNames()
[ "movie", "student", "system.indexes" ]

> mongoexport --db mydb --collection movie --out movie.json
2015-08-08T22:22:58.897+0530 E QUERY    SyntaxError: Unexpected identifier

> my_path: c:/Program Files/MongoDB/Server/3.0/bin "mongoexport -d mydb -c stude
nt"
2015-08-08T22:40:27.622+0530 E QUERY    SyntaxError: Unexpected string

为什么我无法执行mongoimport / mongoexport?

1 个答案:

答案 0 :(得分:1)

刚才我回答了同样的问题,

访问How to export all collection in MongoDB?获取答案。

(注意:我不知道如何复制问题。因此在这里发帖。)