using mongodump to extract meteor data

半腔热情 提交于 2020-01-16 19:33:04

问题


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.

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"

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.

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"

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"


回答1:


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

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

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

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.

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.



来源:https://stackoverflow.com/questions/37510504/using-mongodump-to-extract-meteor-data

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!