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/
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.