Issue
So, I have a Django app, that is connected to a MongoDB database on my local machine. I brought my Django app on a Redhat Linux server. So, now I need MongoDB to be installed on the server: 1- Do I need to have access to the root on Linux server to install MongoDB? 2- I could not find any straight forward instruction to what to do for migration of MongoDB. Do know any references? I appreciate if you could help me with this. Thanks
Solution
First, you should capture the database file: Find this directory on windows cmd: C:\Program Files\MongoDB\Tools\100\bin write the following in the cmd: “mongoexport --db --collection --out output.json” find the database JSON file in that directory
Now you should export you database to the server directory: scp -r /mnt/d/database.json @:/home/...
Now you should import the mongodb database: mongoimport --db --collection --file
Answered By - MohoTa Answer Checked By - Willingham (WPSolving Volunteer)