2016-09-14 3 views
-1

mongodump:mongodump示すエラー:エラーの解析コマンドライン:あまりにも多くの位置のオプション

--host hostname:port -u User -p password--authenticationDatabase admin --dbdb_name --collection collection_name –q {db.getCollection('col_name').find({"statement.context.platform":"abc","statement.timestamp":{'$gte':'2016-03-30T00:00:00','$lte':'2016-04-20T23:59:59'}})}" 

エラー:間

Error parsing command line: too many positional options

MongoDBのバージョン - 2.6

答えて

0
  1. スペース引数はcorrではありません

You must enclose the query in single quotes (e.g. ') to ensure that it does not interact with your shell environment.

とあなたのクエリがqouteを開始する必要はありませんが、それは二重引用符で終了します。電気ショック療法

  • https://docs.mongodb.com/manual/reference/program/mongodump/#cmdoption--query言います。

    これが役立つことを願っています。

  • 関連する問題