I would like to copy the remote mongodb instance from the meteor infrastructure to my local environment.
I tried using the local mongo shell and the db.cloneDatabase() and db.copyDatabase() commands but couldn’t figure out which configuration parameters to use.
The user and password I specified are definitely correct as they allow me to connect to the database via meteor mongo.
Could it be that I also need to set the --authenticationDatabase <dbname> option? If so, what value would that be?
I would suggest using a tool such as robomongo to test the connection to the production database, then once you have that correct use mongodump as suggested before.
I’m not sure if this is the issue but I was having trouble connecting using the mongo shell command, and then I found out my local version of mongo (2.x) was not compatible with Modulus’ mongo version (3.x)
Downloaded and installed newer mongo locally and all worked fine.
I connected to the db using meteor mongo and created another user “export” with the roles: ["backup"].
I can now connect to the database with mongodump but get the following error message:
assertion: 13106 nextSafe(): { $err: "not authorized for query on dbname.system.indexes", code: 16550 }
I tried different roles like “dbOwner” and event “root”, but I always get the same response.