Josh McGee
Josh McGee

Reputation: 552

using mongodump to extract meteor data

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"

Upvotes: 1

Views: 8133

Answers (2)

abddulrahman Emad
abddulrahman Emad

Reputation: 11

1- run cmd as an administrator

2- write in cmd : cd "C:\Program Files\MongoDB\Server\4.2\bin"

3- write in cmd mongodump

then it will work successfully

Upvotes: 1

Robert Moskal
Robert Moskal

Reputation: 22553

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.

Upvotes: 4

Related Questions