使用 mongodump 提取流星数据 [英] using mongodump to extract meteor data

查看:55
本文介绍了使用 mongodump 提取流星数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先我会说,除了一些 mongo 教程之外,我几乎没有编码知识,所以这可能是一个非常简单的答案,我正在尝试将我的流星项目中的数据提取到一个文本文件中,该文件可以已编辑.

I'll preface this by saying I have very little coding knowledge other than a few mongo tutorials so this may be a very simple answer, I'm trying to extract the data from my meteor project into a text file that can be edited.

以前我刚刚安装了meteor(和Node.js),但我已经安装了MongoDB,因为没有它我的cmd窗口会告诉我'mongodump'不被识别为内部或外部命令、可运行的程序或批处理文件"

Previously I've just had meteor (and Node.js) installed but I've installed MongoDB because without it my cmd window would tell me "'mongodump' is not recognized as an internal or external command, operable program or batch file"

然后我按照此处的说明进行操作并确认我的主机在127.0.0.1,端口是3001.此时我也开始运行我的meteor项目并打开一个新的shell.

I then followed the instructions here and confirmed that my host is at 127.0.0.1 with a port of 3001. At this point I also began running my meteor project and opened a new shell.

项目在 D:/projectName 运行,当我从那里执行mongodump -h 127.0.0.1 --port 3001 -d metre"时,它仍然说'mongodump'不被识别为内部或外部命令,可运行的程序或批处理文件"

The project is running at D:/projectName and when I execute "mongodump -h 127.0.0.1 --port 3001 -d meteor" from there it still says "'mongodump' is not recognized as an internal or external command, operable program or batch file"

但是如果我从 mongodump.exe 目录 (C:\Program Files\MongoDB\Server\3.2\bin) 执行同一行,那么它会显示失败:错误转储元数据:为元数据文件 dump\meteor 创建目录错误: mkdir dump: 访问被拒绝"

But if I execute the same line from the mongodump.exe directory (C:\Program Files\MongoDB\Server\3.2\bin) then it says "Failed: error dumping metadata: error creating directory for metadata file dump\meteor: mkdir dump: Access is denied"

推荐答案

您登录的用户没有写入权限

The user you log in with doesn't have permissions to write to the

C:\Program Files\MongoDB\Server\3.2\bin

目录.mongodump 想要写入当前工作目录下的目录.

directory. mongodump wants to write to a directory beneath the current working one.

你可以做两件事.您可以将上述路径添加到您的系统可执行路径,然后从您拥有写入权限的目录运行 mongodump.

You can do two things. You can add the above path to your system executable path and then run mongodump from a directory you have write permissions on.

或者你可以继续从上面的目录运行它,但指定 --out 选项和一个你有写权限的目录的路径.

Or you can keep running it from the above directory but specify the --out option with a path to a directory you have write permissions on.

这篇关于使用 mongodump 提取流星数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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