0

I found this solution with mongodump ( meteor: how can I backup my mongo database ):

mongodump -h 127.0.0.1 --port 3001 -d meteor
mongorestore -h 127.0.0.1 --port 3001 -d meteor dump/meteor

However, I can't use these commands (mongodump and mongorestore) in my Windows 10 console (Error: typo or couldn't find these commands). Do I have to install mongodump and mongorestore first? Just want to save and restore my local Meteor.users/db.users and my App-Collection db.mycollection.

Community
  • 1
  • 1
Meteor Newbie
  • 646
  • 2
  • 10
  • 23
  • 1
    Are those executables located in your mongodb install directory? If so you need to add them to your PATH before using them as you noted – chazsolo Nov 14 '16 at 16:14
  • I don't know where to find them or how to check this. I installed my meteor framework from https://www.meteor.com/install. – Meteor Newbie Nov 14 '16 at 16:34
  • yes, you need to install them yourself. On Mac and Linux they are part of the mongodb installation, not sure how it on Windows. They are not bundled with Meteor. – Christian Fritz Nov 14 '16 at 16:54
  • Does it mean I have to install MongoDB extra from this site: https://www.mongodb.com/download-center?jmp=nav#community ? Would this installation include _mongodump_ and _mongorestore_ and set all PATH I need for these commands automatically? I can't see Windows 10 in the download list. – Meteor Newbie Nov 14 '16 at 17:07
  • Look where you installed MongoDB, something like: `C:\Program Files\MongoDB\Server\3.2\bin. Essentially your question is an XY problem: you need to figure out how to add an executable to your PATH in Windows 10. – chazsolo Nov 14 '16 at 18:13
  • Nice! After MongoDB installation _mongodb-win32-x86_64-2008plus-ssl-3.2.10-signed.msi_ I found _\MongoDB\Server\3.2\bin_ folder and set PATH location to this folder. After this I tried to save and restore my collections and it works! Thanks for your help. – Meteor Newbie Nov 15 '16 at 09:50
  • How can I mark my question as solved? You can also post your answer as solution and I will accept it. – Meteor Newbie Nov 15 '16 at 09:58
  • I'll do that - sorry I didn't get to it earlier! – chazsolo Nov 16 '16 at 20:25

1 Answers1

1

Look where you installed MongoDB, something like: C:\Program Files\MongoDB\Server\3.2\bin. If those executables are in that directory, then you just need to add that directory to your system PATH and they will be available to use a commands.

chazsolo
  • 7,873
  • 1
  • 20
  • 44