There are clone and copydb commands available in mongo shell, how to reach them in mongo node native driver(mongodb)?
That\'s what I have tried:
I discovered
dude, you should essentially just try
use admin;
db.runCommand({
copydb: 1,
fromhost: "myhost",
username:"azureuser",
fromdb: "test",
todb: "test"
})
All mongo asking for is the switch to "admin" db before running such a command, and then it will run fine.
Have you tried using db.admin().command?