File tree Expand file tree Collapse file tree 3 files changed +29
-3
lines changed Expand file tree Collapse file tree 3 files changed +29
-3
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,12 @@ Definition
15
15
16
16
.. dbcommand:: cloneCollection
17
17
18
+ .. deprecated:: 4.2
19
+
20
+ MongoDB deprecates :dbcommand:`cloneCollection` and its helper
21
+ :method:`db.cloneCollection()`. For alternatives, see
22
+ :ref:`4.2-compat-clone-collection`.
23
+
18
24
Copies a collection from a remote :binary:`~bin.mongod` instance to the
19
25
current :binary:`~bin.mongod` instance. :dbcommand:`cloneCollection`
20
26
creates a collection in a database with the same name as the remote
@@ -33,7 +39,7 @@ Definition
33
39
34
40
.. include:: /includes/apiargs/dbcommand-cloneCollection-field.rst
35
41
36
- The :program:` mongo` shell provides the method
42
+ The :binary:`~bin. mongo` shell provides the method
37
43
:method:`db.cloneCollection()` as a wrapper for the
38
44
:dbcommand:`cloneCollection` command.
39
45
Original file line number Diff line number Diff line change @@ -15,6 +15,12 @@ Definition
15
15
16
16
.. method:: db.cloneCollection(from, collection, query)
17
17
18
+ .. deprecated:: 4.2
19
+
20
+ MongoDB deprecates :dbcommand:`cloneCollection` and its helper
21
+ :method:`db.cloneCollection()`. For alternatives, see
22
+ :ref:`4.2-compat-clone-collection`.
23
+
18
24
Copies data directly between MongoDB instances. The
19
25
:method:`db.cloneCollection()` method wraps the
20
26
:dbcommand:`cloneCollection` command and accepts the
Original file line number Diff line number Diff line change @@ -95,8 +95,8 @@ MongoDB removes the MMAPv1 specific options:
95
95
- ``paddingFactor``, ``paddingBytes``, ``preservePadding`` for
96
96
:method:`db.createCollection()`.
97
97
98
- Removed Commands and Methods
99
- ----------------------------
98
+ Removed or Deprecated Commands and Methods
99
+ ------------------------------------------
100
100
101
101
.. _4.2-compat-remove-group:
102
102
@@ -218,6 +218,20 @@ As alternatives:
218
218
:doc:`/tutorial/recover-data-following-unexpected-shutdown` for
219
219
details.
220
220
221
+ .. _4.2-compat-clone-collection:
222
+
223
+ Deprecate Support for ``cloneCollection``
224
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
225
+
226
+ MongoDB deprecates the :dbcommand:`cloneCollection` command and its
227
+ :binary:`~bin.mongo` shell helper :method:`db.cloneCollection()`
228
+
229
+ As alternatives,
230
+
231
+ - Users can use the :pipeline:`$out` aggregation stage.
232
+
233
+ - Users can use :binary:`~bin.mongoexport` and
234
+ :binary:`~bin.mongoimport` or write a script using the drivers.
221
235
222
236
Aggregation
223
237
-----------
You can’t perform that action at this time.
0 commit comments