meteor MongoDB Export a Remote Mongo DB, Import Into a Local Meteor Mongo DB


Example

Helpful when you want to grab a copy of a production database to play around with locally.

  1. mongodump --host some-mongo-host.com:1234 -d DATABASE_NAME -u DATABASE_USER -p DATABASE_PASSWORD This will create a local dump directory; within that directory you'll see a directory with your DATABASE_NAME.
  2. With your local meteor app running, from within the dump directory, run: mongorestore --db meteor --drop -h localhost --port 3001 DATABASE_NAME