简体   繁体   中英

Mongo Import on a Production DB

I have a production system which is running with thousands of user profiles. These profiles were added by us at the time of launch after which users have added/updated more data into it. Now, we are planning to add around 20K more profiles into the system. These 20K Profiles are present in our staging mongo instance.

What would be the best approach to get these profiles on Production instance considering there will be constant read/writes happening on the system? Also, we want to make sure if there is any common user than his profile should not be altered as he might have made some changes to it.

I was thinking of using mongorestore as it guaranties to insert documents and not update. What would be the risk involved?

Thanks

As always - test it first!

If your unhappy with mongorestore's impact on loadthen a custom python script will give you more granular control. This will allow you to put whatever business logic and checks you need and potentially add some flood limitations.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM