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?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…