Copies a remote database to the current database. The command assumes that the remote database has the same name as the current database.
Parameter Type Description hostname string The hostname of the database to copy.
To clone a database named importdb on a host named hostname, issue the following:
use importdb db.cloneDatabase("hostname")
New databases are implicitly created, so the current host does not need to have a database named importdb for this command to succeed.