I created a mongodb dump of database in my local machine. It was put in /dump/ folder as “myProject”. Within myProject I had two files one ending with ****.bson and other with ***.metadata.json.
I moved both the files from myProject folder to my remote server(in digital ocean).
I used mongorestore on myProject folder in remote server.
I have installed mongodb in my remote server.
I got error /dbpath (/data/db/) does not exist and I fixed them using first solution given here.
sudo mkdir -p /data/db/
This textbox defaults to using Markdown to format your answer.
Click below to sign up and get $200 of credit to try our products over 60 days!