Created
July 16, 2014 23:27
-
-
Save ejhayes/4f7aaefe73c3e7d2a769 to your computer and use it in GitHub Desktop.
Installing mongo in OSX and importing data
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# http://docs.mongodb.org/manual/tutorial/install-mongodb-on-os-x/ | |
# unzip data | |
tar -xvzf <backup file in tgz or tar.gz format> | |
# install mongo | |
brew install mongo | |
# create data dir | |
sudo mkdir -p /data/db | |
# run the db (in one window) | |
sudo mongod --dbpath /data/db | |
# import the data | |
mongorestore <extracted data dir> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment