0

I am trying to clone a remote mongo db to a local one. I am attempting to follow these instructions:

http://docs.mongodb.org/manual/reference/command/clone/

In the mongo console I type:

clone: "username@example.com:password@mymongohost.com:10035"

and the console comes back with:

username@example.com:password@mymongohost.com:10035

What am I doing wrong?

Thanks, Kevin

4

1 回答 1

1

Have you tried db.cloneDatabase("username@example.com:password@mymongohost.com:10035") or alternatively passing the {clone: "..."} as argument to db.runCommand()?

I think you're just missing how you're supposed to use those commands as the documentation isn't making it very clear. If you followed the 'copydb' link you might've spotted the example using 'db.copyDatabase()' instead and started wondering maybe there's a wrapper function for clone as well.

于 2013-07-13T12:47:24.717 回答