Skip to content

Latest commit

 

History

History
70 lines (44 loc) · 2.62 KB

README.md

File metadata and controls

70 lines (44 loc) · 2.62 KB

Mongodb to Mongodb
Data transfer

About

To convert data from one MongoDB database to another using Python, we can use the PyMongo library.

Use Cases

here are a few use cases where you may want to convert data from one MongoDB instance to another MongoDB Instance using Python:

  • from Server to Local Mongo db
  • from Local to Server Mongo Db
  • from Server to Server Mongo Db

In all of these use cases, Python and the pymongo library provide a powerful and flexible way to manipulate MongoDB data and transfer it between instances.

Summary

some times we have the data in server, but not in the local
in that time it is very useful to take the data from
server database into local database
here we use the languages are python,django,html

Requirements

  • pip install pymongo
  • pip install django
  • pip install djongo

Running Mongodb 2 mongodb

To run this, you have to follow the below steps

  • first, clone the repositry
  • Ensure you are in mongo2mongo folder, if not please change directory to mongo2mongo folder
  • Then run this command in terminal python manage.py runserver
  • click on the local host (http://127.0.0.1:8000/)

For developers

developers can modify the file (views.py)

Steps to Access the Application

  1. Clone the Repository

  2. python manage.py runserver

  3. Open the application on local host (http://127.0.0.1:8000/) and add below mentioned URL parameters for the functionality required.

    3.1. for Server to Local enter "/servertolocal"

    3.2. for local to server enter "/localtoserver"

    3.3. for server to server enter "/servertoserver"

image

  • Server to Local (best use for taking manual backup) image

  • Local to Server (best use for updating / or deploying new db to server) image

  • Server to Server (best use for migrating database to another instance) image