I am new to mongoDB and pymongo, trying to learn how to load and save databases from/to disk so that I can carry it around, to send it to people etc. I've read the tutorial on http://api.mongodb.org/python/current/tutorial.html but couldn't find useful information about saving and loading a db.
Assuming we create a database like:
import pymongo
mongo = pymongo.Connection()
db = mongo['my_db']
col = db['my_col']
col.insert({'name': 'Adam','occupation': 'student'})
col.insert({'name': 'John','occupation': 'officer'})
#how can we save the database to disk after this point
#and later read it from another program?
insertsaves data to the database. If you are load "from/to disk" where do you expect it to load to? I think you may need to understand the fundamentals of databases here./data/db/mongodb