1
1
.. _c2c-failure-recovery:
2
2
3
- ==========================
4
- Recovery From Sync Failure
5
- ==========================
3
+ =======================================
4
+ Use ``mongosync`` for Disaster Recovery
5
+ =======================================
6
6
7
7
.. default-domain:: mongodb
8
8
@@ -12,22 +12,49 @@ Recovery From Sync Failure
12
12
:depth: 2
13
13
:class: singlecol
14
14
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
+
15
22
:program:`mongosync` temporarily alters some collection characteristics
16
23
during 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.
21
44
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.
23
57
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>`
31
58
32
59
.. _c2c-dr-unique:
33
60
@@ -38,7 +65,7 @@ Unique Indexes
38
65
transient uniqueness violations on the destination cluster. To avoid
39
66
these errors, unique indexes are replicated as non-unique. If
40
67
synchronization 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.
42
69
43
70
Prepare the Index for Conversion
44
71
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -86,15 +113,6 @@ During synchronization, :ref:`hidden indexes <index-type-hidden>` are
86
113
not hidden on the destination cluster. Use the ``collMod`` command to
87
114
hide indexes that should be hidden.
88
115
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
-
98
116
.. _c2c-dr-write-blocking:
99
117
100
118
Write blocking
0 commit comments