Hi Murali,
Questions related to the use of MongoDB (i.e. your question) are better sent to mongodb-user group. This group (mongodb-dev) is for discussion for/by/about developers/development/code of MongoDB.
is there any chance to get the error with lock.
I’m assuming that you’re using MongoDB v2.4 : db.collection.copyTo() to perform the operation. If that’s the case, note that copyTo()
uses eval() internally which will block other operations on the mongod
instance.
Please note that MongoDB v2.4 was released on March 2013 and has reached its end-of-life on March 2016. I would strongly recommend upgrading to the current version v3.4.x.
If you have further questions, please post a new discussion on mongodb-user group along with information below:
* MongoDB deployment topology (standalone, replicaset or sharded cluster).
* The command that you are using to perform the copy.
* Any specific error message (lock error ?) that you’re getting.
Regards,
Wan.