Skip to content

Instantly share code, notes, and snippets.

@iMagdy
Last active February 27, 2016 09:55
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save iMagdy/5519514 to your computer and use it in GitHub Desktop.
Save iMagdy/5519514 to your computer and use it in GitHub Desktop.
How to upload local db to meteor app
# 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
# -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/
@iMagdy
Copy link
Author

iMagdy commented May 5, 2013

And here's how to dump the remote meteor db so you can import to your local db http://stackoverflow.com/a/12447710/559105

@isAlmogK
Copy link

Hi I'm getting the following errors any ideas what I'm doing wrong

ERROR: ERROR: root directory must be a dump of a single database
ERROR: when specifying a db name with --db

@chaitanyacorporation
Copy link

Very helpful ! Please update the port to 3001 as meteor mongodb is exposed from there now.

@notepad104
Copy link

2015-04-22T17:02:37.601+0530 Assertion failure _setName.size() src/mongo/client/dbclientinterface.h 219
2015-04-22T17:02:37.604+0530 0xdcc299 0xd6c7c8 0xd4bfd2 0x663468 0x65d82e 0x605f98 0x606442 0x7f0c07343ec5 0x60af41 
 mongorestore(_ZN5mongo15printStackTraceERSo+0x39) [0xdcc299]
 mongorestore(_ZN5mongo10logContextEPKc+0x198) [0xd6c7c8]
 mongorestore(_ZN5mongo12verifyFailedEPKcS1_j+0x102) [0xd4bfd2]
 mongorestore(_ZN5mongo16ConnectionStringC2ENS0_14ConnectionTypeERKSsS3_+0x1c8) [0x663468]
 mongorestore(_ZN5mongo16ConnectionString5parseERKSsRSs+0x1ce) [0x65d82e]
 mongorestore(_ZN5mongo4Tool4mainEiPPcS2_+0x2c8) [0x605f98]
 mongorestore(main+0x42) [0x606442]
 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5) [0x7f0c07343ec5]
 mongorestore() [0x60af41]
terminate called after throwing an instance of 'mongo::AssertionException'
  what():  assertion src/mongo/client/dbclientinterface.h:219
Aborted (core dumped)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment