11.. _c2c-failure-recovery:
22
3- ==========================
4- Recovery From Sync Failure
5- ==========================
3+ =======================================
4+ Use ``mongosync`` for Disaster Recovery
5+ =======================================
66
77.. default-domain:: mongodb
88
@@ -12,22 +12,49 @@ Recovery From Sync Failure
1212 :depth: 2
1313 :class: singlecol
1414
15+ Setting up {+c2c-product-name+} to prepare for disaster recovery follows the
16+ same procedure as other :ref:`connections <c2c-connecting>` between clusters.
17+ Synchronization keeps the destination cluster up to date with the source
18+ cluster and ready as a backup. In the event that the source cluster fails or
19+ becomes otherwise unavailable, the destination cluster can replace it as the
20+ primary cluster.
21+
1522:program:`mongosync` temporarily alters some collection characteristics
1623during synchronization. The original values are restored during the
17- :ref:`commit process <c2c-api-commit>`. However, a permanent system
18- failure could disrupt synchronization before the sync is committed. If
19- the sync ends prematurely, you must manually reset the collection
20- characteristics on the destination cluster.
24+ :ref:`commit process <c2c-api-commit>`. If synchronization ends prematurely,
25+ you must manually reset these collection characteristics on the destination
26+ cluster before you can use it as the primary cluster.
27+
28+ To prepare the destination cluster to replace the source cluster, make the
29+ following changes:
30+
31+ .. list-table::
32+ :header-rows: 1
33+
34+ * - Change
35+ - Description
36+ * - :ref:`Unique Indexes <c2c-dr-unique>`
37+ - Unique indexes on the source cluster synchronize as non-unique indexes
38+ on the destination cluster.
39+
40+ Indexes that should be unique must be manually set to unique.
41+ * - :ref:`TTL Indexes <c2c-dr-ttl>`
42+ - Synchronization sets ``expireAfterSeconds`` to the value of ``MAX_INT``
43+ on the destination cluster.
2144
22- Manually revert the following temporary changes:
45+ Use the :dbcommand:`collMod` command to set ``expireAfterSeconds``
46+ to the desired value.
47+ * - :ref:`Hidden Indexes <c2c-dr-hidden>`
48+ - Synchronization replicates hidden indexes as non-hidden.
49+
50+ Use the :dbcommand:`collMod` command to hide any indexes that should
51+ be hidden.
52+ * - :ref:`Write Blocking <c2c-dr-write-blocking>`
53+ - ``mongosync`` can disable writes on the destination cluster.
54+
55+ If synchronization was started with write blocking, disable the Write
56+ Block Mode.
2357
24- - :ref:`Unique indexes set as non-unique <c2c-dr-unique>`
25- - :ref:`TTL indexes with expireAfterSeconds set to MAX_INT
26- <c2c-dr-ttl>`
27- - :ref:`Hidden indexes set as non-hidden <c2c-dr-hidden>`
28- - :ref:`Capped collections with size/max set to the maximum possible
29- value <c2c-dr-capped>`
30- - :ref:`Write blocking <c2c-dr-write-blocking>`
3158
3259.. _c2c-dr-unique:
3360
@@ -38,7 +65,7 @@ Unique Indexes
3865transient uniqueness violations on the destination cluster. To avoid
3966these errors, unique indexes are replicated as non-unique. If
4067synchronization ends early, manually resolve any uniqueness violations
41- and convert the non-unique indexes back to unique indexes.
68+ and convert any non-unique indexes that should be unique into unique indexes.
4269
4370Prepare the Index for Conversion
4471~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -86,15 +113,6 @@ During synchronization, :ref:`hidden indexes <index-type-hidden>` are
86113not hidden on the destination cluster. Use the ``collMod`` command to
87114hide indexes that should be hidden.
88115
89- .. _c2c-dr-capped:
90-
91- Capped Collections
92- ------------------
93-
94- During synchronization, :ref:`capped collections
95- <manual-capped-collection>` are set to the maximum allowable size. Use
96- the ``collMod`` command to set the correct maximum size.
97-
98116.. _c2c-dr-write-blocking:
99117
100118Write blocking
0 commit comments