Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save brentjanderson/35b5f2e8d827ea581020 to your computer and use it in GitHub Desktop.
Save brentjanderson/35b5f2e8d827ea581020 to your computer and use it in GitHub Desktop.
# How to upload local db to meteor:
# -h = host, -d = database name, -o = dump folder name
mongodump -h 127.0.0.1:3002 -d meteor -o meteor
# get meteor db url, username, and password
meteor mongo --url myapp.meteor.com
# Response will be something like this:
# mongodb://client:f8f6d5aa-1213-008f-31c8-e9e059515615@production-db-a3.meteor.io:27017/myapp_meteor_com
# The credentials will only last for a minute, so you've got to work quickly
# (or make a script for it, like the inverse version of https://github.com/AlexeyMK/meteor-download)!
# -h = host, -d = database name (app domain), -p = password, meteor = the path to the dumped db folder name
mongorestore -u client -h production-db-a2.meteor.io.meteor.com:27017 -d myapp_meteor_com -p 'password' meteor/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment