问题描述
我尝试使用mongorestore还原数据库,但出现此错误:
2020-09-14T18:48:59.210+0200 error parsing command line options: error parsing positional arguments: provide only one polling interval in seconds and only one MongoDB connection string. Connection strings must begin with mongodb:// or mongodb+srv:// schemes
2020-09-14T18:48:59.258+0200 try 'mongorestore --help' for more information
我尝试了很多组合,例如:
mongorestore -h localhost -d projectdb C:\Users\leo\Downloads\project\projectdbfiles
但是没有成功..我阅读了文档,并尝试使用--host:host和/ host:host ..
我正在使用Windows
解决方法
以下解决方案对我有用
将 mongorestore.exe 复制到 C:\ Users \ leo \ Downloads \ project 文件夹
打开命令提示符C:\ Users \ leo \ Downloads \ project \位置
mongoservice.exe项目dbfiles \
应该可以。