Uploading local DB to digital ocean

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!

1 Like

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

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?

1 Like

Yep. That’s the right approach.

1 Like