Q: Why are the rows empty?
A: It looks like something went wrong.
If you haven't already, I would try db.getLastError()
to see if there's any error message.
I would also look at this link:
How do I copy a database from one MongoDB server to another?
If you are using --auth
, you'll need to include your username/password
in there...
Also you must be on the "destination" server when you run the command.
db.copyDatabase(<from_db>, <to_db>, <from_hostname>, <username>,
<password>);
If all that doesn't work, you might want to try something like
creating a slave of the database you want to copy ...
Finally, review the materials on the MongoDb "copyDatabase" man page:
Please post back with any additional details (e.g. error message).
And, if you get it working, please post back what was wrong, and how you fixed it!
Good luck!