Is there an equivalent function in PyMongo
or mongoengine
to MongoDB's mongodump
? I can't seem to find anything in the docs.
Use case: I need to periodically backup a remote mongo database. The local machine is a production server that does not have mongo installed, and I do not have admin rights, so I can't use subprocess
to call mongodump
. I could install the mongo client locally on a virtualenv, but I'd prefer an API call.
Thanks a lot :-).
mongod
process. However, a way around your problem might be to simply runmongodump
on a remote machine, because you can connect to any remote database withmongodump/restore
etc. You don't need to runmondodump
on the machine that is hosting the db. Make sense? – Luzon