Restore my local mongodb on *

Is it possible to restore my local mongodb on * test deployment site?
I backed it up using mongodump, but I couldn’t find any reference about restoring it on
I guess it’s not possible. Am I right?

It used to be possible. I haven’t tried it for a while, but here’s what used to work.

In the terminal, type:

meteor mongo --url

The is because I’m pointing my domain name at Meteor’s servers. If you’ve just deployed to directly it would just be myAppName (only with your app name :grinning: ).



Take the details from that (client, password, db name) and substitute them into the command below:

mongorestore -u client-5245f5b7 -p e25dfa67-cd86-553f-e915-f3d392bcc9e1 -h -db www_myappname_com -drop


  • I was in a directory with a sub-directory called “dump” that contained the mongodb bson files when I ran this command, which is why there isn’t a path at the end of the command.
  • I used the -drop flag because I wanted to overwrite the existing data in the database
  • You have 1 minute to fire off that mongorestore command after getting the details from the previous command. After that your change will get rejected (“auth fails”).

Some people much cleverer than me came up with this, which is very cool, saving you from the big cut-and-paste-race-against-the-clock:

CMD=`meteor mongo -U | tail -1 | sed 's_mongodb://\([a-z0-9\-]*\):\([a-f0-9\-]*\)@\(.*\)/\(.*\)_mongorestore -u \1 -p \2 -h \3 -d \4_'`
echo $CMD

Replace echo $CMD with:

$CMD /path/to/dump

to actually restore the dump to the servers.

1 Like


Just want to share my experience. I found out that the easiest way to do is to use NoSQL Manager for MongoDB. I just copy paste my Database from local server to production server.


How does this work with apps deployed to * where the meteor deploy process is handling database setup and maintenance?

For me, in production you should use a separate MongoDB. The MongoDB include with meteor is for development only.


I’d argue that the whole * setup is really just for development, but that’s what the OP was asking about.