We are seeing an issue where a copydb command always fails in the following situation:
1. The source mongod is running WITHOUT authentication.
2. The destination mongod is running WITH authentication.
3. Credentials are NOT provided.
When the command is issued, it returns immediately with an empty error message like so:
> db.copyDatabase('fromdb', 'todb', 'from.example.com:10000')
{ "errmsg" : "", "ok" : 0 }If we add dummy credentials to the 'fromdb' database and use those, the copy executes successfully.
It would seem that in order for this command to work without credentials BOTH the source and destination need to be running without the --auth flag. Based on the documentation, credentials should only be required if the source is running with --auth.
- is duplicated by
-
SERVER-10239 copydb mongod fails
- Closed
-
SERVER-8221 Using copyDatabase to copy from an unauthenticated instance to an authenticated instance fails
- Closed
-
SERVER-10197 Failure in copy database across version
- Closed