Make sure you unzip the downloaded file and navigate to the folder actually containing the BSON files)īefore you can use the local mongo instance with your meteor application, make sure you start MongoDB first with the terminal command as shown in step 2.5. Run the command $ mongorestore -d database_name downloads/….(.should be the right path to the folder where the downloaded backup from step 1 is. This will run the Mongo shell which is an application to access data in MongoDB. This should start the Mongo server.Ģ.6 Run the Mongo shell, with the Mongo daemon running in one terminal, run the command mongo in another terminal window. To achieve this, run the command $ mongod.
You can create the directory in the default location by running $ mkdir -p /data/dbĢ.4 Make sure that the /data/db directory has the right permissions by runningĢ.5 Run the Mongo daemon in one of your terminal windows. This is where the Mongo data files will live.
Step 2: Installing MongoDB locally on MacĢ.1 Open the Terminal app and run the command $ brew update to update Homebrew.Ģ.2 Run the command $ brew install mongodb to install mongodb locally.Ģ.3 Create the “db” directory. After the backup is complete, manually download the zip file and unzip. However, this comes at a cost of about $0.50 per backup. This can be done online using the mLab user interface. Step 1 *optional*: Clone your online MongoDB database if you have one I decided I should share it! If you believe it could be improved upon, please don't fail to leave a comment below. As a solution to this problem, I did my research and drew knowledge from various sources to get this article compiled.
Creating builds for a meteor app using a remote (hosted) database can be time-consuming because of the long compile time.