I tried to migrate my collection in a database from one system to another but i was not able to get a solution.
Need some clarity. You’re trying to get a copy of your collection:
- from one machine to another machine?
- use the same database name?
- use the same collection name?
- the collection does or does not exist on the target db?
- use a filter criteria to include specific documents?
- preserve the indexes and other collection attributes?
Correct the above where appropriate.
1.I want to transfer a Collection from one computer to another
2.The transformation process must be based on certain criteria like when we mention about the dates the documents lesser than the mentioned date should be migrated to another system.
3.we should use the same database and collection name
4.If the saved collection or database name does’nt exist we have to create a collection or database with the same name.
5.After migrating the message should be popped up like successfully migrated
Sounds like you don’t need this?
yah it is not neccessary to preserve the indexes and other collection attributes
Ok. You have a two options that are to be used in pairs:
The documentation to these tools can be found here.
thank you so much for your valuable help
by using this mongoexport and mongoimport or mongodump and restore can we do automatically transfer documents from one system to the other
You mean scheduling? None of those tools have scheduling capabilities but you can either write a script to run those commands and schedule it to run on your server, or use MongoDB Ops Manager if you have the Enterprise edition of MongoDB.
Maybe one of the staff at MongoDB can tell you more about Ops Manager if they get to see your thread.
oh… thank you very much,I will try to work on it…
Sir,I have an another doubt how can I effectively design a MongoDB schema for a Relational Database.
Please check the following thread: