Uploading local DB to digital ocean


#1

Hi guys.

I deployed my first meteor app to digtial ocean for the 1st time today using MUP. I was wondering how do I upload my local mongo DB to the server’s mongo DB?

Thanks in advance!


#2

You can use mongodump, to backup your data. Then with mongorestore upload it to the sever.

mongodump --host mongodb1.example.net --port 37017 --username user --password pass --out /opt/backup/mongodump-2011-10-24

mongorestore --host mongodb1.example.net --port 37017 --username user --password pass /opt/backup/mongodump-2011-10-24

#3

I have tried the command but it seems like I get “no reachable servers” error.

Apparently you can’t access mongodb remotely using a Meteor up deployed app

So i guess I’ll have to SSH in, copy the files and use mongorestore from shell? Is that the right approach?


Upload local database to Digital Ocean?
#4

Yep. That’s the right approach.