I want to clone a collection to a backup collection, before processing all the entries in it through my Spring controller.
On searching, I came to know about various ways to do so through terminal. There is also a possibility to use executeCommand menthod to directly execute mongodb commands (copyTo command in my case). But again, I could not find a way to do so.
Could somebody please provide me any pointers on this?