I have two mongodbs in different server, both start with --auth
. Now I want to copy a db from one server to another.
> mongo
> use admin
> db.copyDatabase("mydb","mydb","another_server")
It shows:
{ "errmsg" : "", "ok" : 0 }
And:
> db.getLastError()
null
Seems no error, but the copy is not successful. What's the correct command to use?