This version of the documentation is archived and no longer supported.



The clone command clone a database from a remote MongoDB instance to the current host. clone copies the database on the remote instance with the same name as the current database. The command takes the following form:

{ clone: "" }

Replace above with the resolvable hostname for the MongoDB instance you wish to copy from. Note the following behaviors:

  • clone can run against a slave or a non-primary member of a replica set.
  • clone does not snapshot the database. If any clients update the database you’re copying at any point during the clone operation, the resulting database may be inconsistent.
  • You must run clone on the destination server.
  • The destination server is not locked for the duration of the clone operation. This means that clone will occasionally yield to allow other operations to complete.

See copydb for similar functionality.


This command obtains an intermittent write-lock on the destination server, that can block other operations until it completes.