-
Notifications
You must be signed in to change notification settings - Fork 3
Mongo stuff
This text was motivated by the tutorials by Chris Snyder(private link) and instructions by Kyle Willet
I am working exclusively with Python, so my instructions are targeted and working for that.
The anaconda environment of Continuum.io offers all required packages for this. If you have a basic install, even with pymongo
, the Python Mongo DB interface installed, you might still have not yet the mongo database installed itself (at least that happened to me), but the conda
command can do that for you as well:
conda install mongodb
Now create a folder where you want to save the Mongo database and launch it with
mongod --db-path path_to_db_folder
Run mongorestore on all three BSON collection files (planet_four_classifications, planet_four_subjects, planet_four_users). Example:
mongorestore --db planet_four --drop --collection planet_four_users planet_four_users.bson
with the last file being one of the files in a complete Mongo DB dump for PlanetFour. Note that up to today (2015-03-31) it seems that the Mongo DB dump was incomplete, not containing .bson files, but Chris fixed that one for me today and I was able to execute mongorestore.