@@ -11,7 +11,9 @@ MongoDB provides the :dbcommand:`copydb` and :dbcommand:`clone`
11
11
:term:`database commands <database command>` to support migrations of
12
12
entire logical databases between :program:`mongod` instances. With
13
13
these commands you can copy data between instances with a simple
14
- interface without the need for an intermediate stage.
14
+ interface without the need for an intermediate stage. The
15
+ :method:`db.cloneDatabase()` and :method:`db.copyDatabase()` provide
16
+ helpers for these operations in the :program:`mongod` shell.
15
17
16
18
Data migrations that require an intermediate stage or that involve
17
19
more than one database instance are beyond the scope of this
@@ -20,9 +22,9 @@ for use cases that resemble the following use cases:
20
22
21
23
- data migrations,
22
24
23
- - data warehousing, and
25
+ - data warehousing, and
24
26
25
- - seeding test environments.
27
+ - seeding test environments.
26
28
27
29
Also consider the :doc:`/administration/backups` and
28
30
:doc:`/administration/import-export` documentation for more related
@@ -81,7 +83,7 @@ rename it to ``records`` in the process:
81
83
- Connect to the destination server, running on the
82
84
``db1.example.net`` host, using the :program:`mongo` shell.
83
85
84
- - Model your operation on the following command:
86
+ - Model your operation on the following command:
85
87
86
88
.. code-block:: javascript
87
89
@@ -91,18 +93,18 @@ Rename a Database
91
93
~~~~~~~~~~~~~~~~~
92
94
93
95
You can also use :dbcommand:`copydb` or the
94
- :method:`db.copyDatabase()` helper to:
96
+ :method:`db.copyDatabase()` helper to:
95
97
96
- - rename a database within a single MongoDB instance or
98
+ - rename a database within a single MongoDB instance or
97
99
98
100
- create a duplicate database for testing purposes.
99
101
100
102
Use the following procedure to rename the ``test`` database
101
- ``records`` on a single :program:`mongod` instance:
103
+ ``records`` on a single :program:`mongod` instance:
102
104
103
105
- Connect to the :program:`mongod` using the :program:`mongo` shell.
104
106
105
- - Model your operation on the following command:
107
+ - Model your operation on the following command:
106
108
107
109
.. code-block:: javascript
108
110
@@ -163,9 +165,9 @@ You can use the following procedure to clone a database from the
163
165
.. code-block:: javascript
164
166
165
167
use records
166
-
168
+
167
169
- Use the following operation to initiate the :dbcommand:`clone`
168
- operation:
170
+ operation:
169
171
170
172
.. code-block:: javascript
171
173
0 commit comments