mongorestore错误:不知道如何处理转储文件 [英] mongorestore error: Don't know what to do with the dump file

查看:513
本文介绍了mongorestore错误:不知道如何处理转储文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在以下路径c:\mongodb\bin中安装了mongo DB.我已经在高级设置中配置了环境变量PATH.我也有mongod在运行.当我从以下路径c:\hw1-1\dump(包含BSON文件)运行以下命令 mongorestore dump 时此错误:

I have mongo DB installed in the following path c:\mongodb\bin. I have configured my environment variable PATH in advanced settings.I also have mongod running .When I run the following command mongorestore dump from the following path c:\hw1-1\dump (This contains the BSON files) I'm getting this error:

不知道如何处理转储文件

Don't know what to do with the dump file

我已提及

I have referred to this thread to check my path.

推荐答案

在mongodb 3.0或更高版本中,我们应指定要恢复的数据库名称

in mongodb 3.0 or above, we should specify the database name to restore

mongorestore -d [your_db_name] [your_dump_dir]

这篇关于mongorestore错误:不知道如何处理转储文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆