Making a dump of a not working development db

In development my meteor app starts with

=> Started proxy.
=> Meteor 2.5.1 is available. Update this project with 'meteor update'.
Unexpected mongo exit code null. Restarting.
Unexpected mongo exit code null. Restarting.
Unexpected mongo exit code null. Restarting.
Unexpected mongo exit code null. Restarting.
Unexpected mongo exit code null. Restarting.
Can't start Mongo server.

I cannot find a solution for this. I now plan to solve it by making a dump of the mongo db, erase .meteor/local/db, restart meteor (which works, I tried it) and import the dump into the databbase.

But how do I make a dump from a database which I cannot start? Is it possible to extract some json or something like that, from .meteor/local/db? Or can I access the db in .meteor/local/db with mongo cli?

I’m not sure what the best way is.

But I think the issue is that the database was created by either an older or a newer version of meteor & now the current version can’t run or open it.

If you can guesstimate from which era the database is originally you could change the projects version to that, temporarily.

I’d advise to first make a copy of the db as a backup in any case! :smiley:

→ The second tip would be to create a second meteor app with basically nothing to go through the different meteor major versions with & copy the db to to check whether it can read it. Once you have it running you can connect with a normal MongoDB UI app to access your data.

That’s annoying man I feel you.

Do not erase the db you will lose everything.

You just need to use the built-in tool from mongo to dump it. It’s json data and easy to work with.

Or can I access the db in .meteor/local/db with mongo cli?

Yes you can with mongodump although you may need to get the server started for it to authenticate because you start it with mongodump --uri="mongodb://localhost:3001" so you need to figure why mongo isn’t coming up. First look at your settings file and check nothing is out of place. If you can revert to an older commit where it was working it would be best

You can also use the meteor mongo cli tool Command Line | Meteor API Docs

Hello, We had the same problem recently.
We solved it by not using meteor mongo but starting a stand-alone mongo and telling meteor to use this one