Reputation: 11971
So I have been playing around with meteor
and mongodb
and have a working version set up on my localhost. Unfortunately, when I do meteor deploy xxx.meteor.com
it doesn't deploy my database as well.
How do I do this?
Upvotes: 3
Views: 2061
Reputation: 75945
Meter deploy only deploys a fresh database. To copy over your data you have to use mongorestore with your local mongodb dump, which you can make with mongodump
(docs)
So first dump your database somewhere
mongodump --host localhost:3002
Get your mongodb`s credentials by running (in your project dir):
meteor mongo myapp.meteor.com --url
This will give you your database details in the form:
mongodb://username
:password
@host
:port
/databasename
Then you can plug these into mongorestore
(docs) and restore your local database over
mongorestore -u username -p password -h host:port -d databasename ~/desktop/location_of_your_mongodb_dump
Upvotes: 13