Im using meteor-up to deploy to Digital Ocean. All the files have moved across perfectly but I cant figure out how to upload my local database.
Locally I can backup my database with:
mongodump --port=3001 -o “dump folder name”
And import it with:
mongorestore --port=3001 “dump folder name”
Ideally I would import the database from my local file system straight to the server’s database, is this possible?
As I don’t know if this can be done, for now my database is dumped into a folder within my app. When i deploy Im assuming the files are pushed up to the sever with the rest of my app. If I SSH into the server can I run the import and access the database files that way?
Ive tried to follow this thread: Uploading local DB to digital ocean
I tried this from my local:
mongorestore --host MYDOMAIN --port 37017 --username root --password MY-DROPLET-PASSWORD LOCAL-PATH-TO-DB-FOLDER
But got this error:
Failed: error connecting to db server: no reachable servers
I can SSH into my server and then access mongodb with this:
docker exec -it mongodb mongo DB-NAM
But I’m not sure what to do next? When I try and import in a similar way to what worked locally I get an error:
[main] SyntaxError: missing ; before statement @(shell):1:15