@@ -33,37 +33,78 @@ source using the :parameter:`initialSyncSourceReadPreference` parameter.
3333This parameter can only be specified when starting the
3434:binary:`~bin.mongod`.
3535
36- Process
37- ~~~~~~~
36+ Starting in MongoDB 5.2, initial syncs can be *logical* or *file copy
37+ based*.
3838
39- When you perform an initial sync, MongoDB:
39+ .. _replica-set-initial-sync-logical:
40+
41+ Logical Initial Sync Process
42+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
43+
44+ When you perform a
45+ :ref:`logical initial sync <replica-set-initial-sync-logical>`, MongoDB:
4046
4147#. Clones all databases except the :ref:`local
4248 <replica-set-local-database>` database. To clone, the
4349 :binary:`~bin.mongod` scans every collection in each source database and
4450 inserts all data into its own copies of these collections.
4551
46- .. versionchanged:: 3.4
47- Initial sync builds all collection indexes as the documents are
48- copied for each collection. In earlier versions of MongoDB, only
49- the ``_id`` indexes are built during this stage.
50-
51- .. versionchanged:: 3.4
52- Initial sync pulls newly added oplog records during the data copy. Ensure
53- that the target member has enough disk space in the ``local``
54- database to temporarily store these oplog records for the
55- duration of this data copy stage.
52+ #. Builds all collection indexes as the documents are copied for each
53+ collection.
54+
55+ #. Pulls newly added oplog records during the data copy. Ensure that the
56+ target member has enough disk space in the ``local`` database to
57+ temporarily store these oplog records for the duration of this data
58+ copy stage.
5659
5760#. Applies all changes to the data set. Using the oplog from the
5861 source, the :binary:`~bin.mongod` updates its data set to reflect the
5962 current state of the replica set.
6063
61- When the initial sync finishes, the member transitions from
62- :replstate:`STARTUP2` to :replstate:`SECONDARY`.
64+ When the initial sync finishes, the member transitions from
65+ :replstate:`STARTUP2` to :replstate:`SECONDARY`.
6366
6467To perform an initial sync, see
6568:doc:`/tutorial/resync-replica-set-member`.
6669
70+ .. _replica-set-initial-sync-file-copy-based:
71+
72+ File Copy Based Initial Sync
73+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
74+
75+ :ref:`File copy based initial sync
76+ <replica-set-initial-sync-filed-copy-based>` runs the initial sync
77+ process by copying and moving files on the file system.
78+
79+ File copy based initial sync can be faster than
80+ :ref:`logical initial sync <replica-set-initial-sync-logical>`.
81+
82+ It is only available on Enterprise Server.
83+
84+ Limitations
85+ ```````````
86+
87+ - File copy based initial sync replaces the ``local`` database on the
88+ node being *synced to* with the ``local`` database from the node
89+ being *synced from*.
90+
91+ - You can only run an initial sync from one given node at a time.
92+
93+ - You cannot run a backup on the node that is being *synced to* during
94+ the initial sync.
95+
96+ - You cannot run a backup on the node that is being *synced from* during
97+ the initial sync.
98+
99+ - You cannot use file copy based initial sync with encrypted storage
100+ engine to re-key the data.
101+
102+ .. warning::
103+
104+ You cannot write to the ``local`` database during a file copy based
105+ sync.
106+
107+
67108.. _init-sync-retry:
68109
69110Fault Tolerance
0 commit comments